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

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

Issue 2456773002: Clear the custom element's reaction queue if upgrade fails. (Closed)
Patch Set: Created 4 years, 2 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
Index: third_party/WebKit/Source/core/dom/custom/CustomElementReactionQueue.cpp
diff --git a/third_party/WebKit/Source/core/dom/custom/CustomElementReactionQueue.cpp b/third_party/WebKit/Source/core/dom/custom/CustomElementReactionQueue.cpp
index 9f82b24c7c2d35e570ccd079026a31e5d5565303..f1341f29c60c6418304fe889987e2353cfa71c15 100644
--- a/third_party/WebKit/Source/core/dom/custom/CustomElementReactionQueue.cpp
+++ b/third_party/WebKit/Source/core/dom/custom/CustomElementReactionQueue.cpp
@@ -32,6 +32,10 @@ void CustomElementReactionQueue::invokeReactions(Element* element) {
// inserted by steps which bump the global element queue. This
// means we do not need queue "owner" guards.
// https://html.spec.whatwg.org/multipage/scripting.html#custom-element-reactions
+ clear();
+}
+
+void CustomElementReactionQueue::clear() {
m_index = 0;
m_reactions.resize(0);
}

Powered by Google App Engine
This is Rietveld 408576698