| Index: Source/core/dom/Element.cpp
|
| diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
|
| index 798a32658e8153e173740ecb7ec9469e3461a133..4a7693bd51319af8610565da5685f287c7b67b13 100644
|
| --- a/Source/core/dom/Element.cpp
|
| +++ b/Source/core/dom/Element.cpp
|
| @@ -3237,16 +3237,17 @@ v8::Handle<v8::Object> Element::wrapCustomElement(v8::Handle<v8::Object> creatio
|
| if (!isUpgradedCustomElement() || DOMWrapperWorld::world(context).isIsolatedWorld())
|
| return ContainerNode::wrap(creationContext, isolate);
|
|
|
| - V8PerContextData* perContextData = V8PerContextData::from(context);
|
| - if (!perContextData)
|
| - return v8::Handle<v8::Object>();
|
| -
|
| - CustomElementBinding* binding = perContextData->customElementBinding(customElementDefinition());
|
| const WrapperTypeInfo* wrapperType = wrapperTypeInfo();
|
| v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext, wrapperType, toScriptWrappableBase(), isolate);
|
| if (wrapper.IsEmpty())
|
| return v8::Handle<v8::Object>();
|
|
|
| + V8PerContextData* perContextData = V8PerContextData::from(context);
|
| + if (!perContextData)
|
| + return wrapper;
|
| +
|
| + CustomElementBinding* binding = perContextData->customElementBinding(customElementDefinition());
|
| +
|
| wrapper->SetPrototype(binding->prototype());
|
|
|
| wrapperType->refObject(toScriptWrappableBase());
|
|
|