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

Unified Diff: Source/web/OpenedFrameTracker.cpp

Issue 594483002: Oilpan: extend tracing over WebFrame trees. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Improve weak callback registration Created 6 years, 2 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/web/OpenedFrameTracker.h ('k') | Source/web/WebFrame.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/web/OpenedFrameTracker.h ('k') | Source/web/WebFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698