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

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

Issue 922743002: Dispose Frame when detaching. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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/core/frame/FrameView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/FrameView.cpp
diff --git a/Source/core/frame/FrameView.cpp b/Source/core/frame/FrameView.cpp
index dfb79f47624f4d8c242f5b1310ee1b3a5f635f2b..c6bb9932a881536005ecc99e251181f69af2cec5 100644
--- a/Source/core/frame/FrameView.cpp
+++ b/Source/core/frame/FrameView.cpp
@@ -125,7 +125,7 @@ FrameView::FrameView(LocalFrame* frame)
, m_didScrollTimer(this, &FrameView::didScrollTimerFired)
, m_topControlsViewportAdjustment(0)
, m_needsUpdateWidgetPositions(false)
-#if ENABLE(OILPAN) && ENABLE(ASSERT)
+#if ENABLE(ASSERT)
, m_hasBeenDisposed(false)
#endif
, m_horizontalScrollbarMode(ScrollbarAuto)
@@ -164,13 +164,13 @@ PassRefPtrWillBeRawPtr<FrameView> FrameView::create(LocalFrame* frame, const Int
FrameView::~FrameView()
{
-#if ENABLE(OILPAN)
+#if ENABLE(ASSERT)
ASSERT(m_hasBeenDisposed);
-#else
+#endif
+#if !ENABLE(OILPAN)
// Verify that the LocalFrame has a different FrameView or
// that it is being detached and destructed.
ASSERT(frame().view() != this || !layoutView());
- dispose();
#endif
}
@@ -202,7 +202,7 @@ void FrameView::dispose()
if (ownerElement && ownerElement->ownedWidget() == this)
ownerElement->setWidget(nullptr);
-#if ENABLE(OILPAN) && ENABLE(ASSERT)
+#if ENABLE(ASSERT)
m_hasBeenDisposed = true;
#endif
}
@@ -291,12 +291,8 @@ void FrameView::prepareForDetach()
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
scrollingCoordinator->willDestroyScrollableArea(this);
-#if ENABLE(OILPAN)
- // FIXME: once/if dust settles, do this always (non-Oilpan)?
- //
// FIXME: Oilpan: is this safe to dispose() if there are FrameView protections on the stack?
dispose();
-#endif
}
void FrameView::detachCustomScrollbars()
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698