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

Unified Diff: Source/core/page/Page.cpp

Issue 339493002: Remove redundant calls to FrameLoader::frameDetached(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix layout tests. Created 6 years, 6 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/inspector/InspectorOverlay.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/Page.cpp
diff --git a/Source/core/page/Page.cpp b/Source/core/page/Page.cpp
index 26be6acad3f31ceb43fb483e915bbece462d2996..b3f93c739051ce421425562c9722dbce31d44590 100644
--- a/Source/core/page/Page.cpp
+++ b/Source/core/page/Page.cpp
@@ -601,6 +601,9 @@ void Page::trace(Visitor* visitor)
void Page::willBeDestroyed()
{
+ if (m_mainFrame && m_mainFrame->isLocalFrame())
+ deprecatedLocalMainFrame()->loader().frameDetached();
+
// Disable all agents prior to resetting the frame view.
m_inspectorController->willBeDestroyed();
@@ -615,11 +618,6 @@ void Page::willBeDestroyed()
if (ordinaryPages().contains(this))
ordinaryPages().remove(this);
- for (Frame* frame = mainFrame(); frame; frame = frame->tree().traverseNext()) {
- if (frame->isLocalFrame())
- toLocalFrame(frame)->loader().frameDetached();
- }
-
if (m_scrollingCoordinator)
m_scrollingCoordinator->willBeDestroyed();
« no previous file with comments | « Source/core/inspector/InspectorOverlay.cpp ('k') | Source/core/svg/graphics/SVGImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698