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

Unified Diff: third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp

Issue 2173623003: Add "Failed" custom element state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avoid multiple toElement Created 4 years, 5 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 | « third_party/WebKit/Source/core/dom/custom/CustomElement.cpp ('k') | 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/dom/custom/CustomElementDefinition.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
index b5666d53ed97670c8d1a7ee19172d42d9e5f42c1..c4591086df199461c723131c2f40444eaf0ac08f 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementDefinition.cpp
@@ -122,8 +122,10 @@ void CustomElementDefinition::upgrade(Element* element)
DCHECK_EQ(m_constructionStack.size(), depth); // It's a *stack*.
m_constructionStack.removeLast();
- if (!succeeded)
+ if (!succeeded) {
+ element->setCustomElementState(CustomElementState::Failed);
return;
+ }
CHECK(element->getCustomElementState() == CustomElementState::Custom);
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/custom/CustomElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698