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

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

Issue 194923007: Explicit notification and removal of lifecycle observers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Perform ThreadState detachment last Created 6 years, 9 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/ContextLifecycleNotifier.cpp
diff --git a/Source/core/dom/ContextLifecycleNotifier.cpp b/Source/core/dom/ContextLifecycleNotifier.cpp
index 9a585d8ed1ce1735b88d4b7506666c354e1a1a5a..37e07f5ad4c728e9c023565afaf1ee6fdf64e061 100644
--- a/Source/core/dom/ContextLifecycleNotifier.cpp
+++ b/Source/core/dom/ContextLifecycleNotifier.cpp
@@ -64,6 +64,12 @@ void ContextLifecycleNotifier::removeObserver(ContextLifecycleNotifier::Observer
}
}
+void ContextLifecycleNotifier::removeAndNotifyAllObservers()
+{
+ LifecycleNotifier<ExecutionContext>::removeAndNotifyAllObservers();
+ m_activeDOMObjects.clear();
+}
+
void ContextLifecycleNotifier::notifyResumingActiveDOMObjects()
{
TemporaryChange<IterationType> scope(this->m_iterating, IteratingOverActiveDOMObjects);

Powered by Google App Engine
This is Rietveld 408576698