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
,
11
v8::Local<v8::Name>
key,
12
v8::Local<v8::Value>
value) {
13
v8::TryCatch tryCatch(context->GetIsolate());
14
v8::Isolate::DisallowJavascriptExecutionScope
throwJs(
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());
24
v8::Isolate::DisallowJavascriptExecutionScope
throwJs(
25
context->GetIsolate(),
26
v8::Isolate::DisallowJavascriptExecutionScope::THROW_ON_FAILURE);
27
return
array->CreateDataProperty(context, index, value);
28
}
29
}
// namespace v8_inspector
v8::Maybe
Definition:
v8.h:56
v8::Isolate::DisallowJavascriptExecutionScope
Definition:
v8.h:7229
v8::Local< v8::Context >
v8_inspector
Definition:
v8-inspector.h:15
v8
src
inspector
v8-value-utils.cc
Generated on Tue Dec 25 2018 14:39:02 by
1.8.14