Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8Console.cpp

Issue 2139393002: Revert of Remove constructor from remaining functions that aren't constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 7cf80d63086c6dcd36cad1fd9e093c6a1171a282..921dcbff91bf91854580d0ffb1be6d560a7a5fb3 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 @@
{
v8::Local<v8::String> funcName = toV8StringInternalized(context->GetIsolate(), name);
v8::Local<v8::Function> func;
- if (!v8::Function::New(context, callback, console, 0, v8::ConstructorBehavior::kThrow).ToLocal(&func))
+ if (!v8::Function::New(context, callback, console).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, 0, v8::ConstructorBehavior::kThrow).ToLocal(&toStringFunction))
+ if (v8::Function::New(context, returnDataCallback, returnValue).ToLocal(&toStringFunction))
func->Set(toV8StringInternalized(context->GetIsolate(), "toString"), toStringFunction);
}
if (!console->Set(context, funcName, func).FromMaybe(false))
@@ -676,7 +676,7 @@
DCHECK(success);
if (hasMemoryAttribute)
- 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->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->SetPrivate(context, inspectedContextPrivateKey(isolate), v8::External::New(isolate, inspectedContext));
return console;

Powered by Google App Engine
This is Rietveld 408576698