V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
v8-value-utils.cc
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "src/inspector/v8-value-utils.h"
6 
7 namespace v8_inspector {
8 
9 v8::Maybe<bool> createDataProperty(v8::Local<v8::Context> context,
10  v8::Local<v8::Object> object,
12  v8::Local<v8::Value> value) {
13  v8::TryCatch tryCatch(context->GetIsolate());
15  context->GetIsolate(),
16  v8::Isolate::DisallowJavascriptExecutionScope::THROW_ON_FAILURE);
17  return object->CreateDataProperty(context, key, value);
18 }
19 
20 v8::Maybe<bool> createDataProperty(v8::Local<v8::Context> context,
21  v8::Local<v8::Array> array, int index,
22  v8::Local<v8::Value> value) {
23  v8::TryCatch tryCatch(context->GetIsolate());
25  context->GetIsolate(),
26  v8::Isolate::DisallowJavascriptExecutionScope::THROW_ON_FAILURE);
27  return array->CreateDataProperty(context, index, value);
28 }
29 } // namespace v8_inspector
Definition: v8.h:56