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

Unified Diff: third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp

Issue 2303193002: Add DCHECKs for catching inconsistent custom element state (Closed)
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
index e6a5f1186594c3bcae3e447e903b0e01fb5998f6..ce0c04906fefd85a38222153317939e4df4e08fd 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
+++ b/third_party/WebKit/Source/core/html/parser/HTMLConstructionSite.cpp
@@ -854,6 +854,10 @@ HTMLElement* HTMLConstructionSite::createHTMLElement(AtomicHTMLToken* token)
// association to occur after construction to allow better
// code sharing here.
element = HTMLElementFactory::createHTMLElement(token->name(), document, form, getCreateElementFlags());
+ // Definition for the created element does not exist here and
+ // it cannot be custom or failed.
+ DCHECK_NE(element->getCustomElementState(), CustomElementState::Custom);
+ DCHECK_NE(element->getCustomElementState(), CustomElementState::Failed);
// "8. Append each attribute in the given token to element."
setAttributes(element, token, m_parserContentPolicy);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698