| Index: Source/core/dom/custom/CustomElementRegistry.cpp
|
| diff --git a/Source/core/dom/custom/CustomElementRegistry.cpp b/Source/core/dom/custom/CustomElementRegistry.cpp
|
| index eedbfaa8b750ed1087dcb553b5f9b4099075c27f..a3b9775947ca47e3be8beaadbe578a655a2edc81 100644
|
| --- a/Source/core/dom/custom/CustomElementRegistry.cpp
|
| +++ b/Source/core/dom/custom/CustomElementRegistry.cpp
|
| @@ -81,18 +81,17 @@ CustomElementDefinition* CustomElementRegistry::registerElement(Document* docume
|
| return 0;
|
| }
|
|
|
| + if (m_registeredTypeNames.contains(type)) {
|
| + CustomElementException::throwException(CustomElementException::TypeAlreadyRegistered, type, exceptionState);
|
| + return 0;
|
| + }
|
| +
|
| QualifiedName tagName = QualifiedName::null();
|
| if (!constructorBuilder->validateOptions(type, tagName, exceptionState))
|
| return 0;
|
|
|
| ASSERT(tagName.namespaceURI() == HTMLNames::xhtmlNamespaceURI || tagName.namespaceURI() == SVGNames::svgNamespaceURI);
|
|
|
| - // FIXME: This should be done earlier in validateOptions.
|
| - if (m_registeredTypeNames.contains(type)) {
|
| - CustomElementException::throwException(CustomElementException::TypeAlreadyRegistered, type, exceptionState);
|
| - return 0;
|
| - }
|
| -
|
| ASSERT(!observer.registrationContextWentAway());
|
|
|
| RefPtr<CustomElementLifecycleCallbacks> lifecycleCallbacks = constructorBuilder->createCallbacks();
|
|
|