Index: third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
diff --git a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
index e5b1b0ece0756630a49bb0f25c06a4c75eb391d7..dc5dde35aa16013d8289e401ac118c398c5f19c3 100644 |
--- a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
+++ b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl |
@@ -563,7 +563,7 @@ void {{v8_class}}Constructor::NamedConstructorAttributeGetter( |
// Set the prototype of named constructors to the regular constructor. |
auto privateProperty = V8PrivateProperty::getNamedConstructorInitialized(info.GetIsolate()); |
v8::Local<v8::Context> currentContext = info.GetIsolate()->GetCurrentContext(); |
- v8::Local<v8::Value> privateValue = privateProperty.get(currentContext, namedConstructor); |
+ v8::Local<v8::Value> privateValue = privateProperty.getOrEmpty(namedConstructor); |
if (privateValue.IsEmpty()) { |
v8::Local<v8::Function> interface = perContextData->constructorForType(&{{v8_class}}::wrapperTypeInfo); |
@@ -571,7 +571,7 @@ void {{v8_class}}Constructor::NamedConstructorAttributeGetter( |
bool result = namedConstructor->Set(currentContext, v8AtomicString(info.GetIsolate(), "prototype"), interfacePrototype).ToChecked(); |
if (!result) |
return; |
- privateProperty.set(currentContext, namedConstructor, v8::True(info.GetIsolate())); |
+ privateProperty.set(namedConstructor, v8::True(info.GetIsolate())); |
} |
v8SetReturnValue(info, namedConstructor); |