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..8c8ff50ee8130ecfc1e3b223de83d88677c16cd4 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,18 @@ 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 |
nasko
2015/03/12 17:32:13
nit: "out-of-process"
kenrb
2015/03/12 19:03:35
Done.
|
+ // 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) { |
nasko
2015/03/12 17:32:13
nit: this is a oneliner, so no need for {}, I've m
kenrb
2015/03/12 19:03:35
Done.
|
+ proxy_to_parent->SetChildRWHView(render_frame_host_->GetView()); |
+ } |
} |
// After all is done, there must never be a proxy in the list which has the |