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) |