Chromium Code Reviews

Unified Diff: Source/platform/LifecycleObserver.h

Issue 916033002: Oilpan: Move LifecycleNotifier's hierarchy to Oilpan's heap Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « Source/platform/LifecycleNotifier.h ('k') | Source/platform/Supplementable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/LifecycleObserver.h
diff --git a/Source/platform/LifecycleObserver.h b/Source/platform/LifecycleObserver.h
index 44b5d2a345379cb149506772b252de4000401b4b..d4cd3f3b1827e202e552c1498c3a88398309588a 100644
--- a/Source/platform/LifecycleObserver.h
+++ b/Source/platform/LifecycleObserver.h
@@ -34,10 +34,6 @@ namespace blink {
template<typename T>
class LifecycleObserver : public WillBeGarbageCollectedMixin {
- // FIXME: Oilpan: Remove the pre-finalizer by moving LifecycleNotifier
- // to Oilpan's heap and making LifecycleNotifier::m_observers
- // a hash set of weak members.
- WILL_BE_USING_PRE_FINALIZER(LifecycleObserver, dispose);
public:
typedef T Context;
@@ -53,15 +49,12 @@ public:
: m_lifecycleContext(nullptr)
, m_observerType(type)
{
-#if ENABLE(OILPAN)
- ThreadState::current()->registerPreFinalizer(*this);
-#endif
setContext(context);
}
virtual ~LifecycleObserver()
{
#if !ENABLE(OILPAN)
- dispose();
+ setContext(nullptr);
#endif
}
@@ -70,10 +63,6 @@ public:
visitor->trace(m_lifecycleContext);
}
virtual void contextDestroyed() { }
- void dispose()
- {
- setContext(nullptr);
- }
Context* lifecycleContext() const { return m_lifecycleContext; }
void clearLifecycleContext() { m_lifecycleContext = nullptr; }
« no previous file with comments | « Source/platform/LifecycleNotifier.h ('k') | Source/platform/Supplementable.h » ('j') | no next file with comments »

Powered by Google App Engine