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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 464593003: Don't swap out the old RenderFrameHost until the new one commits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase past PlzNavigate CL Created 6 years, 4 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 | « content/content_browser.gypi ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 30d405fe6e5f4ff5944f0ff7a2dbf80b3ee3ba32..6db63204a76e74ffdb0516a895315ff56ddb1a6a 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1000,8 +1000,8 @@ void RenderFrameImpl::OnSwapOut(int proxy_routing_id) {
if (!is_swapped_out_ || !render_view_->is_swapped_out_) {
// Swap this RenderFrame out so the frame can navigate to a page rendered by
// a different process. This involves running the unload handler and
- // clearing the page. Once WasSwappedOut is called, we also allow this
- // process to exit if there are no other active RenderFrames in it.
+ // clearing the page. We also allow this process to exit if there are no
+ // other active RenderFrames in it.
// Send an UpdateState message before we get swapped out. Create the
// RenderFrameProxy as well so its routing id is registered for receiving
@@ -1074,6 +1074,10 @@ void RenderFrameImpl::OnSwapOut(int proxy_routing_id) {
set_render_frame_proxy(proxy);
}
}
+
+ // Safe to exit if no one else is using the process.
+ if (!frame_->parent())
+ render_view_->WasSwappedOut();
}
void RenderFrameImpl::OnContextMenuClosed(
« no previous file with comments | « content/content_browser.gypi ('k') | content/renderer/render_view_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698