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

Unified Diff: Source/bindings/v8/V8PerContextData.cpp

Issue 23717043: Implement Custom Elements 'extends' option. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | « Source/bindings/v8/CustomElementConstructorBuilder.cpp ('k') | Source/core/dom/CustomElementException.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8PerContextData.cpp
diff --git a/Source/bindings/v8/V8PerContextData.cpp b/Source/bindings/v8/V8PerContextData.cpp
index ab0f66205ad442ebf928049ca066239f146556d1..f3ab0b8b5bf6cc642162547e574fd71e08b887bb 100644
--- a/Source/bindings/v8/V8PerContextData.cpp
+++ b/Source/bindings/v8/V8PerContextData.cpp
@@ -140,7 +140,10 @@ v8::Local<v8::Function> V8PerContextData::constructorForTypeSlowCase(WrapperType
v8::Local<v8::Object> V8PerContextData::prototypeForType(WrapperTypeInfo* type)
{
- return constructorForType(type)->Get(v8String("prototype", m_isolate)).As<v8::Object>();
+ v8::Local<v8::Object> constructor = constructorForType(type);
+ if (constructor.IsEmpty())
+ return v8::Local<v8::Object>();
+ return constructor->Get(v8String("prototype", m_isolate)).As<v8::Object>();
}
void V8PerContextData::addCustomElementBinding(CustomElementDefinition* definition, PassOwnPtr<CustomElementBinding> binding)
« no previous file with comments | « Source/bindings/v8/CustomElementConstructorBuilder.cpp ('k') | Source/core/dom/CustomElementException.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698