// 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 createDataProperty(v8::Local context, v8::Local object, v8::Local key, v8::Local 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 createDataProperty(v8::Local context, v8::Local array, int index, v8::Local 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