Index: Source/platform/LifecycleObserver.h |
diff --git a/Source/platform/LifecycleObserver.h b/Source/platform/LifecycleObserver.h |
index 6637428da094e1f927fe49f5baeec6b75879bacb..f1d6f788fce07a135cc5580d9878a3c79b5729a4 100644 |
--- a/Source/platform/LifecycleObserver.h |
+++ b/Source/platform/LifecycleObserver.h |
@@ -37,11 +37,6 @@ class LifecycleObserver : public WillBeGarbageCollectedMixin { |
public: |
using Context = T; |
- LifecycleObserver() |
- : m_lifecycleContext(nullptr) |
- { |
- } |
- |
#if !ENABLE(OILPAN) |
virtual ~LifecycleObserver() |
{ |
@@ -64,6 +59,12 @@ public: |
void clearLifecycleContext() { m_lifecycleContext = nullptr; } |
protected: |
+ explicit LifecycleObserver(Context* context) |
+ : m_lifecycleContext(nullptr) |
+ { |
+ setContext(context); |
+ } |
+ |
void setContext(Context*); |
private: |