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

Unified Diff: Source/core/page/FrameTree.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/page/FrameTree.cpp
diff --git a/Source/core/page/FrameTree.cpp b/Source/core/page/FrameTree.cpp
index 1353965dd771ee3fd1349314a778ea4af4f418f9..fa1d27b1974ec8e9e5082fd29ea03ba8bde88abe 100644
--- a/Source/core/page/FrameTree.cpp
+++ b/Source/core/page/FrameTree.cpp
@@ -50,6 +50,7 @@ FrameTree::FrameTree(Frame* thisFrame)
FrameTree::~FrameTree()
{
+#if !ENABLE(OILPAN)
// FIXME: Why is this here? Doesn't this parallel what we already do in ~LocalFrame?
for (Frame* child = firstChild(); child; child = child->tree().nextSibling()) {
if (child->isLocalFrame())
@@ -57,6 +58,7 @@ FrameTree::~FrameTree()
else if (child->isRemoteFrame())
toRemoteFrame(child)->setView(nullptr);
}
+#endif
}
void FrameTree::setName(const AtomicString& name, const AtomicString& fallbackName)
@@ -85,7 +87,7 @@ Frame* FrameTree::top() const
if (!m_thisFrame->client())
return m_thisFrame;
Frame* candidate = m_thisFrame->client()->top();
- return candidate ? candidate : m_thisFrame;
+ return candidate ? candidate : m_thisFrame.get();
}
Frame* FrameTree::previousSibling() const
@@ -254,7 +256,7 @@ Frame* FrameTree::find(const AtomicString& name) const
return top();
if (name == "_parent")
- return parent() ? parent() : m_thisFrame;
+ return parent() ? parent() : m_thisFrame.get();
// Since "_blank" should never be any frame's name, the following just amounts to an optimization.
if (name == "_blank")
@@ -377,6 +379,11 @@ Frame* FrameTree::deepLastChild() const
return result;
}
+void FrameTree::trace(Visitor* visitor)
+{
+ visitor->trace(m_thisFrame);
+}
+
} // namespace blink
#ifndef NDEBUG

Powered by Google App Engine
This is Rietveld 408576698