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

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

Issue 2317483005: Clear LifecycleObserver::m_context when LifecycleObserver::contextDestroyed gets called (Closed)
Patch Set: temp 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/LifecycleObserver.h
diff --git a/third_party/WebKit/Source/platform/LifecycleObserver.h b/third_party/WebKit/Source/platform/LifecycleObserver.h
index 34a491f3ce15d5cc8f1fe7003c1db255639bb81d..ed8dee5a5e9cdfb7e3d267042afe236a89802208 100644
--- a/third_party/WebKit/Source/platform/LifecycleObserver.h
+++ b/third_party/WebKit/Source/platform/LifecycleObserver.h
@@ -43,6 +43,11 @@ public:
Context* lifecycleContext() const { return m_lifecycleContext; }
+ void clearContext()
+ {
+ setContext(nullptr);
+ }
+
protected:
explicit LifecycleObserver(Context* context)
: m_lifecycleContext(nullptr)
@@ -52,11 +57,6 @@ protected:
void setContext(Context*);
- void clearContext()
- {
- setContext(nullptr);
- }
-
private:
WeakMember<Context> m_lifecycleContext;
};

Powered by Google App Engine
This is Rietveld 408576698