Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: third_party/WebKit/Source/core/dom/custom/CustomElementRegistry.cpp

Issue 1854423002: ASSERT -> {DCHECK|DCHECK_XX}, ENABLE(ASSERT) -> DCHECK_IS_ON() in dom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mark svg/as-image/svg-nested.html crash on win Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698