ebd070ec2f
- introduced ValueMirror interface, this interface contains methods to generate different protocol entities, - introduced DebugPropertyIterator, this iterator iterates through object properties in the following order: exotic indices, enumerable strings, all other properties, - removed all injected script infra, e.g. closure compiler, R=dgozman@chromium.org TBR=yangguo@chromium.org Bug: chromium:595206 Change-Id: I030fdb3a80074ca6edd4749f86b39b590776ae6f Reviewed-on: https://chromium-review.googlesource.com/c/1310056 Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Cr-Commit-Position: refs/heads/master@{#57181}
30 lines
1.2 KiB
C++
30 lines
1.2 KiB
C++
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "src/inspector/v8-value-utils.h"
|
|
|
|
namespace v8_inspector {
|
|
|
|
v8::Maybe<bool> createDataProperty(v8::Local<v8::Context> context,
|
|
v8::Local<v8::Object> object,
|
|
v8::Local<v8::Name> key,
|
|
v8::Local<v8::Value> value) {
|
|
v8::TryCatch tryCatch(context->GetIsolate());
|
|
v8::Isolate::DisallowJavascriptExecutionScope throwJs(
|
|
context->GetIsolate(),
|
|
v8::Isolate::DisallowJavascriptExecutionScope::THROW_ON_FAILURE);
|
|
return object->CreateDataProperty(context, key, value);
|
|
}
|
|
|
|
v8::Maybe<bool> createDataProperty(v8::Local<v8::Context> context,
|
|
v8::Local<v8::Array> array, int index,
|
|
v8::Local<v8::Value> value) {
|
|
v8::TryCatch tryCatch(context->GetIsolate());
|
|
v8::Isolate::DisallowJavascriptExecutionScope throwJs(
|
|
context->GetIsolate(),
|
|
v8::Isolate::DisallowJavascriptExecutionScope::THROW_ON_FAILURE);
|
|
return array->CreateDataProperty(context, index, value);
|
|
}
|
|
} // namespace v8_inspector
|