| Index: third_party/WebKit/Source/bindings/core/v8/V0CustomElementConstructorBuilder.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V0CustomElementConstructorBuilder.cpp b/third_party/WebKit/Source/bindings/core/v8/V0CustomElementConstructorBuilder.cpp
|
| index 1e63be522720e7056b4f6f075b0174e57883830c..7c61f6b6bd55f30685b3e560e623edb22592dd7f 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/V0CustomElementConstructorBuilder.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/V0CustomElementConstructorBuilder.cpp
|
| @@ -194,12 +194,11 @@ bool V0CustomElementConstructorBuilder::createConstructor(
|
|
|
| v8::Local<v8::Object> data = v8::Object::New(isolate);
|
| V8PrivateProperty::getCustomElementDocument(isolate).set(
|
| - context, data, ToV8(document, context->Global(), isolate));
|
| + data, ToV8(document, context->Global(), isolate));
|
| V8PrivateProperty::getCustomElementNamespaceURI(isolate).set(
|
| - context, data, v8String(isolate, descriptor.namespaceURI()));
|
| - V8PrivateProperty::getCustomElementTagName(isolate).set(context, data,
|
| - v8TagName);
|
| - V8PrivateProperty::getCustomElementType(isolate).set(context, data, v8Type);
|
| + data, v8String(isolate, descriptor.namespaceURI()));
|
| + V8PrivateProperty::getCustomElementTagName(isolate).set(data, v8TagName);
|
| + V8PrivateProperty::getCustomElementType(isolate).set(data, v8Type);
|
|
|
| v8::Local<v8::FunctionTemplate> constructorTemplate =
|
| v8::FunctionTemplate::New(isolate);
|
| @@ -240,7 +239,7 @@ bool V0CustomElementConstructorBuilder::createConstructor(
|
| return false;
|
|
|
| V8PrivateProperty::getCustomElementIsInterfacePrototypeObject(isolate).set(
|
| - context, m_prototype, v8::True(isolate));
|
| + m_prototype, v8::True(isolate));
|
| if (!v8CallBoolean(m_prototype->DefineOwnProperty(
|
| context, v8String(isolate, "constructor"), m_constructor,
|
| v8::DontEnum)))
|
| @@ -257,7 +256,7 @@ bool V0CustomElementConstructorBuilder::prototypeIsValid(
|
|
|
| if (m_prototype->InternalFieldCount() ||
|
| V8PrivateProperty::getCustomElementIsInterfacePrototypeObject(isolate)
|
| - .hasValue(context, m_prototype)) {
|
| + .hasValue(m_prototype)) {
|
| V0CustomElementException::throwException(
|
| V0CustomElementException::PrototypeInUse, type, exceptionState);
|
| return false;
|
| @@ -321,25 +320,24 @@ static void constructCustomElement(
|
| return;
|
| }
|
|
|
| - ScriptState* scriptState = ScriptState::current(isolate);
|
| v8::Local<v8::Object> data = v8::Local<v8::Object>::Cast(info.Data());
|
| - v8::Local<v8::Context> context = scriptState->context();
|
| Document* document =
|
| V8Document::toImpl(V8PrivateProperty::getCustomElementDocument(isolate)
|
| - .get(context, data)
|
| + .getOrEmpty(data)
|
| .As<v8::Object>());
|
| - TOSTRING_VOID(V8StringResource<>, namespaceURI,
|
| - V8PrivateProperty::getCustomElementNamespaceURI(isolate).get(
|
| - context, data));
|
| + TOSTRING_VOID(
|
| + V8StringResource<>, namespaceURI,
|
| + V8PrivateProperty::getCustomElementNamespaceURI(isolate).getOrEmpty(
|
| + data));
|
| TOSTRING_VOID(
|
| V8StringResource<>, tagName,
|
| - V8PrivateProperty::getCustomElementTagName(isolate).get(context, data));
|
| + V8PrivateProperty::getCustomElementTagName(isolate).getOrEmpty(data));
|
| v8::Local<v8::Value> maybeType =
|
| - V8PrivateProperty::getCustomElementType(isolate).get(context, data);
|
| + V8PrivateProperty::getCustomElementType(isolate).getOrEmpty(data);
|
| TOSTRING_VOID(V8StringResource<>, type, maybeType);
|
|
|
| - ExceptionState exceptionState(
|
| - info.GetIsolate(), ExceptionState::ConstructionContext, "CustomElement");
|
| + ExceptionState exceptionState(isolate, ExceptionState::ConstructionContext,
|
| + "CustomElement");
|
| V0CustomElementProcessingStack::CallbackDeliveryScope deliveryScope;
|
| Element* element = document->createElementNS(
|
| namespaceURI, tagName,
|
|
|