diff options
Diffstat (limited to 'dom')
-rw-r--r-- | dom/base/CustomElementRegistry.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/dom/base/CustomElementRegistry.cpp b/dom/base/CustomElementRegistry.cpp index 34ad9549d..897f7df12 100644 --- a/dom/base/CustomElementRegistry.cpp +++ b/dom/base/CustomElementRegistry.cpp @@ -817,14 +817,6 @@ CustomElementRegistry::Define(const nsAString& aName, // Associate the definition with the custom element. nsCOMPtr<nsIAtom> localNameAtom(NS_Atomize(localName)); LifecycleCallbacks* callbacks = callbacksHolder.forget(); - CustomElementDefinition* definition = - new CustomElementDefinition(nameAtom, - localNameAtom, - &aFunctionConstructor, - Move(observedAttributes), - constructorPrototype, - callbacks, - 0 /* TODO dependent on HTML imports. Bug 877072 */); /** * 12. Add definition to this CustomElementRegistry. @@ -834,6 +826,15 @@ CustomElementRegistry::Define(const nsAString& aName, return; } + CustomElementDefinition* definition = + new CustomElementDefinition(nameAtom, + localNameAtom, + &aFunctionConstructor, + Move(observedAttributes), + constructorPrototype, + callbacks, + 0 /* TODO dependent on HTML imports. Bug 877072 */); + mCustomDefinitions.Put(nameAtom, definition); MOZ_ASSERT(mCustomDefinitions.Count() == mConstructors.count(), |