Index: Source/platform/LifecycleNotifier.h |
diff --git a/Source/platform/LifecycleNotifier.h b/Source/platform/LifecycleNotifier.h |
index 818cd931b998d9a6583f08f1bc2a21d13b8a1c87..c7d7cb094444fc26157a69cbd7de3844335d61d0 100644 |
--- a/Source/platform/LifecycleNotifier.h |
+++ b/Source/platform/LifecycleNotifier.h |
@@ -45,9 +45,12 @@ public: |
return adoptPtr(new LifecycleNotifier(context)); |
} |
+ virtual ~LifecycleNotifier() |
+ { |
+ ASSERT(!m_observers.size()); |
+ } |
- virtual ~LifecycleNotifier(); |
- |
+ void contextDestroyed(); |
// FIXME: this won't need to be virtual anymore. |
virtual void addObserver(Observer*); |
@@ -84,7 +87,7 @@ private: |
}; |
template<typename T> |
-inline LifecycleNotifier<T>::~LifecycleNotifier() |
+inline void LifecycleNotifier<T>::contextDestroyed() |
{ |
TemporaryChange<IterationType> scope(this->m_iterating, IteratingOverAll); |
for (typename ObserverSet::iterator it = m_observers.begin(); it != m_observers.end(); it = m_observers.begin()) { |