| 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 c38d3da0f4337329c21b26c664667324a8b7f593..e03351d51d1eb1e5f8a92db877c7dadab1615a62 100644
|
| --- a/third_party/WebKit/Source/platform/LifecycleNotifier.h
|
| +++ b/third_party/WebKit/Source/platform/LifecycleNotifier.h
|
| @@ -61,9 +61,7 @@ protected:
|
| {
|
| }
|
|
|
| -#if DCHECK_IS_ON()
|
| T* context() { return static_cast<T*>(this); }
|
| -#endif
|
|
|
| using ObserverSet = HeapHashSet<WeakMember<Observer>>;
|
|
|
| @@ -98,8 +96,9 @@ inline void LifecycleNotifier<T, Observer>::notifyContextDestroyed()
|
| ObserverSet observers;
|
| m_observers.swap(observers);
|
| for (Observer* observer : observers) {
|
| - ASSERT(observer->lifecycleContext() == context());
|
| + DCHECK(observer->lifecycleContext() == context());
|
| observer->contextDestroyed();
|
| + observer->clearContext();
|
| }
|
| }
|
|
|
|
|