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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 525583002: Fix RenderFrameHost lifetime and clean up CommitPending. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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/browser/frame_host/render_frame_host_manager_unittest.cc ('k') | no next file » | 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 ca5cf55aa3761765972eae6c626116de02aeba1e..f029e2a5cf72d00882660f7ce85068fa02d0992f 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -1051,12 +1051,15 @@ void RenderFrameImpl::OnSwapOut(int proxy_routing_id) {
// 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
- // IPC messages.
+ // Send an UpdateState message before we get swapped out.
render_view_->SyncNavigationState();
- proxy = RenderFrameProxy::CreateProxyToReplaceFrame(this,
- proxy_routing_id);
+
+ // If we need a proxy to replace this, create it now so its routing id is
+ // registered for receiving IPC messages.
+ if (proxy_routing_id != MSG_ROUTING_NONE) {
+ proxy = RenderFrameProxy::CreateProxyToReplaceFrame(this,
+ proxy_routing_id);
+ }
// Synchronously run the unload handler before sending the ACK.
// TODO(creis): Call dispatchUnloadEvent unconditionally here to support
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698