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

Unified Diff: Source/core/frame/FrameView.h

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/FrameView.h
diff --git a/Source/core/frame/FrameView.h b/Source/core/frame/FrameView.h
index d77e627d05dbcc9b16705b2a5620bbc95849d59f..4777757f5bfb7be657b5ef89b1a87bd0f413026d 100644
--- a/Source/core/frame/FrameView.h
+++ b/Source/core/frame/FrameView.h
@@ -57,6 +57,7 @@ class RenderWidget;
typedef unsigned long long DOMTimeStamp;
+// FIXME: Oilpan: move Widget (and thereby FrameView) to the heap.
class FrameView FINAL : public ScrollView {
public:
friend class RenderView;
@@ -418,7 +419,13 @@ private:
// FIXME: These are just "children" of the FrameView and should be RefPtr<Widget> instead.
WillBePersistentHeapHashSet<RefPtrWillBeMember<RenderWidget> > m_widgets;
- RefPtr<LocalFrame> m_frame;
+ // Oilpan: the use of a persistent back reference 'emulates' the
+ // RefPtr-cycle that is kept between the two objects non-Oilpan.
+ //
+ // That cycle is broken when a LocalFrame is detached by
+ // FrameLoader::detachFromParent(), it then clears its
+ // FrameView's m_frame reference by calling setView(nullptr).
+ RefPtrWillBePersistent<LocalFrame> m_frame;
bool m_doFullPaintInvalidation;

Powered by Google App Engine
This is Rietveld 408576698