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

Unified Diff: Source/bindings/core/v8/CustomElementConstructorBuilder.cpp

Issue 1153613007: bindings: Use CreateDataProperty() instead of ForceSet() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix uninitialized error Created 5 years, 6 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
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptValueSerializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/CustomElementConstructorBuilder.cpp
diff --git a/Source/bindings/core/v8/CustomElementConstructorBuilder.cpp b/Source/bindings/core/v8/CustomElementConstructorBuilder.cpp
index 07d975284ae9837da236ef45e51f24ab02051288..0858f74171893eeb9f3d7417afb0c14cff2e7381 100644
--- a/Source/bindings/core/v8/CustomElementConstructorBuilder.cpp
+++ b/Source/bindings/core/v8/CustomElementConstructorBuilder.cpp
@@ -193,10 +193,10 @@ bool CustomElementConstructorBuilder::createConstructor(Document* document, Cust
// no side effects.
if (!v8CallBoolean(m_constructor->Set(context, prototypeKey, m_prototype)))
return false;
- // This *configures* the property. ForceSet of a function's
+ // This *configures* the property. DefineOwnProperty of a function's
// "prototype" does not affect the value, but can reconfigure the
// property.
- if (!v8CallBoolean(m_constructor->ForceSet(context, prototypeKey, m_prototype, v8::PropertyAttribute(v8::ReadOnly | v8::DontEnum | v8::DontDelete))))
+ if (!v8CallBoolean(m_constructor->DefineOwnProperty(context, prototypeKey, m_prototype, v8::PropertyAttribute(v8::ReadOnly | v8::DontEnum | v8::DontDelete))))
return false;
v8::Local<v8::String> constructorKey = v8String(isolate, "constructor");
@@ -208,7 +208,7 @@ bool CustomElementConstructorBuilder::createConstructor(Document* document, Cust
return false;
V8HiddenValue::setHiddenValue(isolate, m_prototype, V8HiddenValue::customElementIsInterfacePrototypeObject(isolate), v8::True(isolate));
- if (!v8CallBoolean(m_prototype->ForceSet(context, v8String(isolate, "constructor"), m_constructor, v8::DontEnum)))
+ if (!v8CallBoolean(m_prototype->DefineOwnProperty(context, v8String(isolate, "constructor"), m_constructor, v8::DontEnum)))
return false;
return true;
« no previous file with comments | « no previous file | Source/bindings/core/v8/ScriptValueSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698