Index: Source/web/OpenedFrameTracker.cpp |
diff --git a/Source/web/OpenedFrameTracker.cpp b/Source/web/OpenedFrameTracker.cpp |
index 2120f339a6d4f91c0ebb075c83f58f4eae36aed4..ec3f62f253cb84037081a08a0310e3db60f94761 100644 |
--- a/Source/web/OpenedFrameTracker.cpp |
+++ b/Source/web/OpenedFrameTracker.cpp |
@@ -5,6 +5,7 @@ |
#include "config.h" |
#include "web/OpenedFrameTracker.h" |
+#include "platform/heap/Handle.h" |
#include "public/web/WebFrame.h" |
namespace blink { |
@@ -15,7 +16,10 @@ OpenedFrameTracker::OpenedFrameTracker() |
OpenedFrameTracker::~OpenedFrameTracker() |
{ |
+#if !ENABLE(OILPAN) |
+ // Oilpan takes care of clearing weak m_opener fields during GC. |
updateOpener(0); |
+#endif |
} |
bool OpenedFrameTracker::isEmpty() const |
@@ -40,4 +44,13 @@ void OpenedFrameTracker::updateOpener(WebFrame* frame) |
(*it)->m_opener = frame; |
} |
+void OpenedFrameTracker::traceFrames(Visitor* visitor) |
+{ |
+#if ENABLE(OILPAN) |
+ HashSet<WebFrame*>::iterator end = m_openedFrames.end(); |
+ for (HashSet<WebFrame*>::iterator it = m_openedFrames.begin(); it != end; ++it) |
+ WebFrame::traceFrame(visitor, *it); |
+#endif |
+} |
+ |
} // namespace blink |