| Index: third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp
|
| diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp
|
| index 921dcbff91bf91854580d0ffb1be6d560a7a5fb3..7cf80d63086c6dcd36cad1fd9e093c6a1171a282 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp
|
| @@ -265,13 +265,13 @@ void createBoundFunctionProperty(v8::Local<v8::Context> context, v8::Local<v8::O
|
| {
|
| v8::Local<v8::String> funcName = toV8StringInternalized(context->GetIsolate(), name);
|
| v8::Local<v8::Function> func;
|
| - if (!v8::Function::New(context, callback, console).ToLocal(&func))
|
| + if (!v8::Function::New(context, callback, console, 0, v8::ConstructorBehavior::kThrow).ToLocal(&func))
|
| return;
|
| func->SetName(funcName);
|
| if (description) {
|
| v8::Local<v8::String> returnValue = toV8String(context->GetIsolate(), description);
|
| v8::Local<v8::Function> toStringFunction;
|
| - if (v8::Function::New(context, returnDataCallback, returnValue).ToLocal(&toStringFunction))
|
| + if (v8::Function::New(context, returnDataCallback, returnValue, 0, v8::ConstructorBehavior::kThrow).ToLocal(&toStringFunction))
|
| func->Set(toV8StringInternalized(context->GetIsolate(), "toString"), toStringFunction);
|
| }
|
| if (!console->Set(context, funcName, func).FromMaybe(false))
|
| @@ -676,7 +676,7 @@ v8::Local<v8::Object> V8Console::createConsole(InspectedContext* inspectedContex
|
| DCHECK(success);
|
|
|
| if (hasMemoryAttribute)
|
| - console->SetAccessorProperty(toV8StringInternalized(isolate, "memory"), v8::Function::New(isolate, V8Console::memoryGetterCallback, console), v8::Function::New(isolate, V8Console::memorySetterCallback), static_cast<v8::PropertyAttribute>(v8::None), v8::DEFAULT);
|
| + console->SetAccessorProperty(toV8StringInternalized(isolate, "memory"), v8::Function::New(context, V8Console::memoryGetterCallback, console, 0, v8::ConstructorBehavior::kThrow).ToLocalChecked(), v8::Function::New(context, V8Console::memorySetterCallback, v8::Local<v8::Value>(), 0, v8::ConstructorBehavior::kThrow).ToLocalChecked(), static_cast<v8::PropertyAttribute>(v8::None), v8::DEFAULT);
|
|
|
| console->SetPrivate(context, inspectedContextPrivateKey(isolate), v8::External::New(isolate, inspectedContext));
|
| return console;
|
|
|