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

Unified Diff: Source/core/dom/CustomElementRegistry.cpp

Issue 14660019: Run Mutation Observer and Custom Element callbacks consistently at microtask checkpoint (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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: Source/core/dom/CustomElementRegistry.cpp
diff --git a/Source/core/dom/CustomElementRegistry.cpp b/Source/core/dom/CustomElementRegistry.cpp
index 779526a68bd306dfc7fa6bf506cbdc54e892d90e..b701868cc2309ef3c388e092d558ac327adc959a 100644
--- a/Source/core/dom/CustomElementRegistry.cpp
+++ b/Source/core/dom/CustomElementRegistry.cpp
@@ -325,4 +325,21 @@ void CustomElementRegistry::deliverAllLifecycleCallbacks()
}
}
+bool CustomElementRegistry::hasQueuedLifecycleCallbacks()
+{
+ return !activeCustomElementRegistries().isEmpty();
+}
+
+void CustomElementRegistry::abandonAllQueuedLifecycleCallbacks()
+{
+ for (InstanceSet::iterator it = activeCustomElementRegistries().begin(); it != activeCustomElementRegistries().end(); ++it)
+ (*it)->abandonQueuedLifecycleCallbacks();
+ activeCustomElementRegistries().clear();
+}
+
+void CustomElementRegistry::abandonQueuedLifecycleCallbacks()
+{
+ m_invocations.clear();
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698