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

Unified Diff: Source/web/WebFrame.cpp

Issue 1166623002: Oilpan: Remove a visitor parameter from isHeapObjectAlive (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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
« no previous file with comments | « Source/platform/heap/Visitor.h ('k') | Source/wtf/DefaultAllocator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrame.cpp
diff --git a/Source/web/WebFrame.cpp b/Source/web/WebFrame.cpp
index afe9436feb03f83482452501edf268f198649a2e..b7504104a33a316fa96046dccffa5a74da7d4b35 100644
--- a/Source/web/WebFrame.cpp
+++ b/Source/web/WebFrame.cpp
@@ -297,6 +297,17 @@ WebFrame::~WebFrame()
}
#if ENABLE(OILPAN)
+ALWAYS_INLINE bool WebFrame::isFrameAlive(const WebFrame* frame)
+{
+ if (!frame)
+ return true;
+
+ if (frame->isWebLocalFrame())
+ return Heap::isHeapObjectAlive(toWebLocalFrameImpl(frame));
+
+ return Heap::isHeapObjectAlive(toWebRemoteFrameImpl(frame));
+}
+
template <typename VisitorDispatcher>
ALWAYS_INLINE void WebFrame::traceFrameImpl(VisitorDispatcher visitor, WebFrame* frame)
{
@@ -321,28 +332,15 @@ ALWAYS_INLINE void WebFrame::traceFramesImpl(VisitorDispatcher visitor, WebFrame
}
template <typename VisitorDispatcher>
-ALWAYS_INLINE bool WebFrame::isFrameAliveImpl(VisitorDispatcher visitor, const WebFrame* frame)
-{
- if (!frame)
- return true;
-
- if (frame->isWebLocalFrame())
- return visitor->isHeapObjectAlive(toWebLocalFrameImpl(frame));
-
- return visitor->isHeapObjectAlive(toWebRemoteFrameImpl(frame));
-}
-
-template <typename VisitorDispatcher>
ALWAYS_INLINE void WebFrame::clearWeakFramesImpl(VisitorDispatcher visitor)
{
- if (!isFrameAlive(visitor, m_opener))
+ if (!isFrameAlive(m_opener))
m_opener = nullptr;
}
#define DEFINE_VISITOR_METHOD(VisitorDispatcher) \
void WebFrame::traceFrame(VisitorDispatcher visitor, WebFrame* frame) { traceFrameImpl(visitor, frame); } \
void WebFrame::traceFrames(VisitorDispatcher visitor, WebFrame* frame) { traceFramesImpl(visitor, frame); } \
- bool WebFrame::isFrameAlive(VisitorDispatcher visitor, const WebFrame* frame) { return isFrameAliveImpl(visitor, frame); } \
void WebFrame::clearWeakFrames(VisitorDispatcher visitor) { clearWeakFramesImpl(visitor); }
DEFINE_VISITOR_METHOD(Visitor*)
« no previous file with comments | « Source/platform/heap/Visitor.h ('k') | Source/wtf/DefaultAllocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698