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

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

Issue 1041473002: Detach old frame on WebFrame::swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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/frame/RemoteFrame.h ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/RemoteFrame.cpp
diff --git a/Source/core/frame/RemoteFrame.cpp b/Source/core/frame/RemoteFrame.cpp
index 12f842cc01ce4176c34c05400045f80e6f548e78..c174cc73f17773feb8ed9e8c6fd2ba796f9e1840 100644
--- a/Source/core/frame/RemoteFrame.cpp
+++ b/Source/core/frame/RemoteFrame.cpp
@@ -83,7 +83,7 @@ void RemoteFrame::reload(FrameLoadType frameLoadType, ClientRedirectPolicy clien
remoteFrameClient()->reload(frameLoadType, clientRedirectPolicy);
}
-void RemoteFrame::detach()
+void RemoteFrame::detach(FrameDetachType type)
{
PluginScriptForbiddenScope forbidPluginDestructorScripting;
// Frame::detach() requires the caller to keep a reference to this, since
@@ -96,7 +96,13 @@ void RemoteFrame::detach()
client()->willBeDetached();
m_windowProxyManager->clearForClose();
setView(nullptr);
- Frame::detach();
+ Frame::detach(type);
+}
+
+bool RemoteFrame::prepareForCommit()
+{
+ detachChildren();
+ return !!host();
}
RemoteSecurityContext* RemoteFrame::securityContext() const
« no previous file with comments | « Source/core/frame/RemoteFrame.h ('k') | Source/core/html/HTMLFrameOwnerElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698