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 0d95e1e361c7f630c4187a8eec3a49fa0828b8a0..77cdb4d3090daa66f9bb1aa0f2c8a8ace2122dc6 100644 |
--- a/content/browser/frame_host/render_frame_host_manager.cc |
+++ b/content/browser/frame_host/render_frame_host_manager.cc |
@@ -1357,8 +1357,17 @@ void RenderFrameHostManager::CommitPending() { |
linked_ptr<RenderFrameHostImpl>(old_render_frame_host.release()); |
} |
} else { |
- CHECK(proxy_hosts_.find(render_frame_host_->GetSiteInstance()->GetId()) == |
- proxy_hosts_.end()); |
+ if (CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kSitePerProcess) && !is_main_frame) { |
awong
2014/09/03 21:58:38
Document why we care that it's not a mainframe?
nasko
2014/09/03 23:50:19
Done.
|
+ // In --site-per-process, delete the proxy for the SiteInstance we are |
+ // committing |
+ RenderFrameProxyHostMap::iterator iter = |
+ proxy_hosts_.find(render_frame_host_->GetSiteInstance()->GetId()); |
+ if (iter != proxy_hosts_.end()) { |
+ delete iter->second; |
+ proxy_hosts_.erase(iter); |
+ } |
+ } |
// Capture the active view count on the old RFH SiteInstance, since the |
// ownership might be passed into the proxy and the pointer will be |
@@ -1393,6 +1402,8 @@ void RenderFrameHostManager::CommitPending() { |
} |
} |
} |
+ CHECK(proxy_hosts_.find(render_frame_host_->GetSiteInstance()->GetId()) == |
awong
2014/09/03 21:58:38
Explain why this check is sensible?
nasko
2014/09/03 23:50:19
Done.
|
+ proxy_hosts_.end()); |
} |
void RenderFrameHostManager::ShutdownRenderFrameProxyHostsInSiteInstance( |