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

Unified Diff: content/browser/frame_host/render_frame_host_manager.cc

Issue 998353003: CrossProcessFrameConnector configuration happening too soon (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments addressed 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_manager.cc
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index f9e2bf976fcbe85f71d53b78f7fbd8fe5bcf37f9..065cf5adbba2d8ff859838bc3f51f0c729702916 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -1659,16 +1659,6 @@ void RenderFrameHostManager::CommitPending() {
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kSitePerProcess) &&
!is_main_frame) {
- // If this is a subframe, it should have a CrossProcessFrameConnector
- // created already. Use it to link the new RFH's view to the proxy that
- // belongs to the parent frame's SiteInstance.
- // Note: We do this after swapping out the old RFH because that may create
- // the proxy we're looking for.
- RenderFrameProxyHost* proxy_to_parent = GetProxyToParent();
- if (proxy_to_parent) {
- proxy_to_parent->SetChildRWHView(render_frame_host_->GetView());
- }
-
// Since the new RenderFrameHost is now committed, there must be no proxies
// for its SiteInstance. Delete any existing ones.
RenderFrameProxyHostMap::iterator iter =
@@ -1677,6 +1667,17 @@ void RenderFrameHostManager::CommitPending() {
delete iter->second;
proxy_hosts_.erase(iter);
}
+
+ // If this is a subframe, it should have a CrossProcessFrameConnector
+ // created already. Use it to link the new RFH's view to the proxy that
+ // belongs to the parent frame's SiteInstance. If this navigation causes
+ // an out-of-process frame to return to the same process as its parent, the
+ // proxy would have been removed from proxy_hosts_ above.
+ // Note: We do this after swapping out the old RFH because that may create
+ // the proxy we're looking for.
+ RenderFrameProxyHost* proxy_to_parent = GetProxyToParent();
+ if (proxy_to_parent)
+ proxy_to_parent->SetChildRWHView(render_frame_host_->GetView());
}
// After all is done, there must never be a proxy in the list which has the
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698