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

Unified Diff: Source/core/frame/FrameDestructionObserver.cpp

Issue 517043003: Move Frame to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Back out non-Oilpan experiment + tidy up by adding frame() ref accessors Created 6 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: Source/core/frame/FrameDestructionObserver.cpp
diff --git a/Source/core/frame/FrameDestructionObserver.cpp b/Source/core/frame/FrameDestructionObserver.cpp
index e0aefc042261b82da708ec2972200b5ee8b07442..6c561da7b28d1136e9370b3f33caa5aeb7b41022 100644
--- a/Source/core/frame/FrameDestructionObserver.cpp
+++ b/Source/core/frame/FrameDestructionObserver.cpp
@@ -31,16 +31,17 @@
namespace blink {
FrameDestructionObserver::FrameDestructionObserver(LocalFrame* frame)
- : m_frame(0)
+ : m_frame(nullptr)
{
observeFrame(frame);
}
+#if !ENABLE(OILPAN)
FrameDestructionObserver::~FrameDestructionObserver()
{
observeFrame(0);
-
}
+#endif
void FrameDestructionObserver::observeFrame(LocalFrame* frame)
{
@@ -53,14 +54,21 @@ void FrameDestructionObserver::observeFrame(LocalFrame* frame)
m_frame->addDestructionObserver(this);
}
+#if !ENABLE(OILPAN)
void FrameDestructionObserver::frameDestroyed()
{
- m_frame = 0;
+ m_frame = nullptr;
}
+#endif
void FrameDestructionObserver::willDetachFrameHost()
{
// Subclasses should override this function to handle this notification.
}
+void FrameDestructionObserver::trace(Visitor* visitor)
+{
+ visitor->trace(m_frame);
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698