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

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

Issue 1097243002: [Reland] Implement Custom Element's class side inheritance (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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: Source/bindings/core/v8/CustomElementConstructorBuilder.cpp
diff --git a/Source/bindings/core/v8/CustomElementConstructorBuilder.cpp b/Source/bindings/core/v8/CustomElementConstructorBuilder.cpp
index 5c57589d4347430d49734e7ef2356cb345bae8ad..07d975284ae9837da236ef45e51f24ab02051288 100644
--- a/Source/bindings/core/v8/CustomElementConstructorBuilder.cpp
+++ b/Source/bindings/core/v8/CustomElementConstructorBuilder.cpp
@@ -199,6 +199,14 @@ bool CustomElementConstructorBuilder::createConstructor(Document* document, Cust
if (!v8CallBoolean(m_constructor->ForceSet(context, prototypeKey, m_prototype, v8::PropertyAttribute(v8::ReadOnly | v8::DontEnum | v8::DontDelete))))
return false;
+ v8::Local<v8::String> constructorKey = v8String(isolate, "constructor");
+ v8::Local<v8::Value> constructorPrototype;
+ if (!m_prototype->Get(context, constructorKey).ToLocal(&constructorPrototype))
deepak.s 2015/04/21 08:37:03 Now, we are using maybe version of *Get*.
+ return false;
+
+ if (!v8CallBoolean(m_constructor->SetPrototype(context, constructorPrototype)))
+ 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)))
return false;

Powered by Google App Engine
This is Rietveld 408576698