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

Unified Diff: third_party/WebKit/Source/platform/LifecycleNotifier.h

Issue 2365463004: Revert of Clear LifecycleObserver::m_context when LifecycleObserver::contextDestroyed gets called (Closed)
Patch Set: Created 4 years, 3 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/platform/LifecycleNotifier.h
diff --git a/third_party/WebKit/Source/platform/LifecycleNotifier.h b/third_party/WebKit/Source/platform/LifecycleNotifier.h
index e03351d51d1eb1e5f8a92db877c7dadab1615a62..c38d3da0f4337329c21b26c664667324a8b7f593 100644
--- a/third_party/WebKit/Source/platform/LifecycleNotifier.h
+++ b/third_party/WebKit/Source/platform/LifecycleNotifier.h
@@ -61,7 +61,9 @@
{
}
+#if DCHECK_IS_ON()
T* context() { return static_cast<T*>(this); }
+#endif
using ObserverSet = HeapHashSet<WeakMember<Observer>>;
@@ -96,9 +98,8 @@
ObserverSet observers;
m_observers.swap(observers);
for (Observer* observer : observers) {
- DCHECK(observer->lifecycleContext() == context());
+ ASSERT(observer->lifecycleContext() == context());
observer->contextDestroyed();
- observer->clearContext();
}
}
« no previous file with comments | « third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp ('k') | third_party/WebKit/Source/platform/LifecycleObserver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698