Chromium Code Reviews| Index: Source/platform/LifecycleContext.h |
| diff --git a/Source/platform/LifecycleContext.h b/Source/platform/LifecycleContext.h |
| index d2eee95e45287eb6a63c2a09c35b9b384d67f8ea..5253e9362547a676111593272990c1a87cf6331d 100644 |
| --- a/Source/platform/LifecycleContext.h |
| +++ b/Source/platform/LifecycleContext.h |
| @@ -45,7 +45,10 @@ public: |
| typedef LifecycleObserver<T> Observer; |
| LifecycleContext() { } |
| - virtual ~LifecycleContext() { } |
| + virtual ~LifecycleContext() |
| + { |
| + ASSERT(!m_lifecycleNotifier); |
|
sof
2014/12/26 08:21:42
Add a comment next to this to indicate what might
|
| + } |
| virtual bool isContextThread() const { return true; } |
| @@ -59,6 +62,13 @@ public: |
| protected: |
| Notifier& lifecycleNotifier(); |
| + void contextDestroyed() |
|
sof
2014/12/26 08:21:42
nit: add an empty line.
|
| + { |
| + if (m_lifecycleNotifier) { |
| + m_lifecycleNotifier->contextDestroyed(); |
| + m_lifecycleNotifier.clear(); |
| + } |
| + } |
| private: |
| PassOwnPtr<Notifier> createLifecycleNotifier(); |