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

Unified Diff: Source/platform/LifecycleNotifier.h

Issue 203393002: Revert of Explicit notification and removal of lifecycle observers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/LifecycleNotifier.h
diff --git a/Source/platform/LifecycleNotifier.h b/Source/platform/LifecycleNotifier.h
index f75d3cfccf7017b07b36210fcc9ca59186228864..57d684f009aa4b463b3ac7e83c32ac36dabbf581 100644
--- a/Source/platform/LifecycleNotifier.h
+++ b/Source/platform/LifecycleNotifier.h
@@ -64,8 +64,6 @@
{
}
- virtual void removeAndNotifyAllObservers();
-
Context* context() const { return m_context; }
enum IterationType {
@@ -88,7 +86,7 @@
};
template<typename T>
-inline void LifecycleNotifier<T>::removeAndNotifyAllObservers()
+inline LifecycleNotifier<T>::~LifecycleNotifier()
{
TemporaryChange<IterationType> scope(this->m_iterating, IteratingOverAll);
for (typename ObserverSet::iterator it = m_observers.begin(); it != m_observers.end(); it = m_observers.begin()) {
@@ -97,12 +95,6 @@
ASSERT(observer->lifecycleContext() == m_context);
observer->contextDestroyed();
}
-}
-
-template<typename T>
-inline LifecycleNotifier<T>::~LifecycleNotifier()
-{
- removeAndNotifyAllObservers();
}
template<typename T>
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698