| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 if (m_registeredTypeNames.contains(type)) { | 56 if (m_registeredTypeNames.contains(type)) { |
| 57 CustomElementException::throwException(CustomElementException::TypeAlrea
dyRegistered, type, exceptionState); | 57 CustomElementException::throwException(CustomElementException::TypeAlrea
dyRegistered, type, exceptionState); |
| 58 return 0; | 58 return 0; |
| 59 } | 59 } |
| 60 | 60 |
| 61 QualifiedName tagName = QualifiedName::null(); | 61 QualifiedName tagName = QualifiedName::null(); |
| 62 if (!constructorBuilder->validateOptions(type, tagName, exceptionState)) | 62 if (!constructorBuilder->validateOptions(type, tagName, exceptionState)) |
| 63 return 0; | 63 return 0; |
| 64 | 64 |
| 65 ASSERT(tagName.namespaceURI() == HTMLNames::xhtmlNamespaceURI || tagName.nam
espaceURI() == SVGNames::svgNamespaceURI); | 65 DCHECK(tagName.namespaceURI() == HTMLNames::xhtmlNamespaceURI || tagName.nam
espaceURI() == SVGNames::svgNamespaceURI); |
| 66 | 66 |
| 67 ASSERT(!m_documentWasDetached); | 67 DCHECK(!m_documentWasDetached); |
| 68 | 68 |
| 69 RawPtr<CustomElementLifecycleCallbacks> lifecycleCallbacks = constructorBuil
der->createCallbacks(); | 69 RawPtr<CustomElementLifecycleCallbacks> lifecycleCallbacks = constructorBuil
der->createCallbacks(); |
| 70 | 70 |
| 71 // Consulting the constructor builder could execute script and | 71 // Consulting the constructor builder could execute script and |
| 72 // kill the document. | 72 // kill the document. |
| 73 if (m_documentWasDetached) { | 73 if (m_documentWasDetached) { |
| 74 CustomElementException::throwException(CustomElementException::ContextDe
stroyedCreatingCallbacks, type, exceptionState); | 74 CustomElementException::throwException(CustomElementException::ContextDe
stroyedCreatingCallbacks, type, exceptionState); |
| 75 return 0; | 75 return 0; |
| 76 } | 76 } |
| 77 | 77 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 96 { | 96 { |
| 97 return m_definitions.get(descriptor); | 97 return m_definitions.get(descriptor); |
| 98 } | 98 } |
| 99 | 99 |
| 100 DEFINE_TRACE(CustomElementRegistry) | 100 DEFINE_TRACE(CustomElementRegistry) |
| 101 { | 101 { |
| 102 visitor->trace(m_definitions); | 102 visitor->trace(m_definitions); |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace blink | 105 } // namespace blink |
| OLD | NEW |