| Index: Source/bindings/v8/CustomElementConstructorBuilder.cpp
|
| diff --git a/Source/bindings/v8/CustomElementConstructorBuilder.cpp b/Source/bindings/v8/CustomElementConstructorBuilder.cpp
|
| index df4bdbbd2d9998d78b611ee4b6962c21c546b025..778e2b48988051fa40015ef7e0cc964d2502834a 100644
|
| --- a/Source/bindings/v8/CustomElementConstructorBuilder.cpp
|
| +++ b/Source/bindings/v8/CustomElementConstructorBuilder.cpp
|
| @@ -43,7 +43,6 @@
|
| #include "bindings/v8/ScriptState.h"
|
| #include "bindings/v8/UnsafePersistent.h"
|
| #include "bindings/v8/V8Binding.h"
|
| -#include "bindings/v8/V8HiddenPropertyName.h"
|
| #include "bindings/v8/V8PerContextData.h"
|
| #include "core/dom/Document.h"
|
| #include "core/dom/custom/CustomElementCallbackDispatcher.h"
|
| @@ -191,10 +190,10 @@ bool CustomElementConstructorBuilder::createConstructor(Document* document, Cust
|
|
|
| m_constructor->SetName(v8Type->IsNull() ? v8TagName : v8Type.As<v8::String>());
|
|
|
| - V8HiddenPropertyName::setNamedHiddenReference(m_constructor, "customElementDocument", toV8(document, m_context->Global(), isolate));
|
| - V8HiddenPropertyName::setNamedHiddenReference(m_constructor, "customElementNamespaceURI", v8String(isolate, descriptor.namespaceURI()));
|
| - V8HiddenPropertyName::setNamedHiddenReference(m_constructor, "customElementTagName", v8TagName);
|
| - V8HiddenPropertyName::setNamedHiddenReference(m_constructor, "customElementType", v8Type);
|
| + setHiddenValue(isolate, m_constructor, "customElementDocument", toV8(document, m_context->Global(), isolate));
|
| + setHiddenValue(isolate, m_constructor, "customElementNamespaceURI", v8String(isolate, descriptor.namespaceURI()));
|
| + setHiddenValue(isolate, m_constructor, "customElementTagName", v8TagName);
|
| + setHiddenValue(isolate, m_constructor, "customElementType", v8Type);
|
|
|
| v8::Handle<v8::String> prototypeKey = v8String(isolate, "prototype");
|
| ASSERT(m_constructor->HasOwnProperty(prototypeKey));
|
| @@ -207,7 +206,7 @@ bool CustomElementConstructorBuilder::createConstructor(Document* document, Cust
|
| // property.
|
| m_constructor->ForceSet(prototypeKey, m_prototype, v8::PropertyAttribute(v8::ReadOnly | v8::DontEnum | v8::DontDelete));
|
|
|
| - V8HiddenPropertyName::setNamedHiddenReference(m_prototype, "customElementIsInterfacePrototypeObject", v8::True(isolate));
|
| + setHiddenValue(isolate, m_prototype, "customElementIsInterfacePrototypeObject", v8::True(isolate));
|
| m_prototype->ForceSet(v8String(isolate, "constructor"), m_constructor, v8::DontEnum);
|
|
|
| return true;
|
| @@ -215,7 +214,7 @@ bool CustomElementConstructorBuilder::createConstructor(Document* document, Cust
|
|
|
| bool CustomElementConstructorBuilder::prototypeIsValid(const AtomicString& type, ExceptionState& exceptionState) const
|
| {
|
| - if (m_prototype->InternalFieldCount() || !m_prototype->GetHiddenValue(V8HiddenPropertyName::customElementIsInterfacePrototypeObject(m_context->GetIsolate())).IsEmpty()) {
|
| + if (m_prototype->InternalFieldCount() || !getHiddenValue(m_context->GetIsolate(), m_prototype, "customElementIsInterfacePrototypeObject").IsEmpty()) {
|
| CustomElementException::throwException(CustomElementException::PrototypeInUse, type, exceptionState);
|
| return false;
|
| }
|
| @@ -270,10 +269,10 @@ static void constructCustomElement(const v8::FunctionCallbackInfo<v8::Value>& in
|
| return;
|
| }
|
|
|
| - Document* document = V8Document::toNative(info.Callee()->GetHiddenValue(V8HiddenPropertyName::customElementDocument(isolate)).As<v8::Object>());
|
| - V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, namespaceURI, info.Callee()->GetHiddenValue(V8HiddenPropertyName::customElementNamespaceURI(isolate)));
|
| - V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, tagName, info.Callee()->GetHiddenValue(V8HiddenPropertyName::customElementTagName(isolate)));
|
| - v8::Handle<v8::Value> maybeType = info.Callee()->GetHiddenValue(V8HiddenPropertyName::customElementType(isolate));
|
| + Document* document = V8Document::toNative(getHiddenValue(isolate, info.Callee(), "customElementDocument").As<v8::Object>());
|
| + V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, namespaceURI, getHiddenValue(isolate, info.Callee(), "customElementNamespaceURI"));
|
| + V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, tagName, getHiddenValue(isolate, info.Callee(), "customElementTagName"));
|
| + v8::Handle<v8::Value> maybeType = getHiddenValue(isolate, info.Callee(), "customElementType");
|
| V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, type, maybeType);
|
|
|
| ExceptionState exceptionState(ExceptionState::ConstructionContext, "CustomElement", info.Holder(), info.GetIsolate());
|
|
|