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

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

Issue 1262563003: Subframes in inner WebContents should not create proxies in process of outer WebContents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | testing/buildbot/chromium.fyi.json » ('j') | 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 18890339a74b76ed4f2293c1bc742e6372f42fb6..4f8a828a2b6d513a98ccbca2d7ad5e65e86cc3ed 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -263,9 +263,6 @@ RenderWidgetHostView* RenderFrameHostManager::GetRenderWidgetHostView() const {
}
bool RenderFrameHostManager::ForInnerDelegate() {
- // TODO(lazyboy): Subframes inside inner WebContents needs to be tested and
- // we have to make sure that IsMainFrame() check below is appropriate. See
- // http://crbug.com/500957.
return frame_tree_node_->IsMainFrame() &&
Charlie Reis 2015/07/28 22:36:02 I still question whether this should return false
lazyboy 2015/07/30 19:46:31 I've made the function only care about its inner-n
delegate_->GetOuterDelegateFrameTreeNodeID() !=
FrameTreeNode::kFrameTreeNodeInvalidID;
@@ -1787,6 +1784,11 @@ int RenderFrameHostManager::CreateRenderFrameProxy(SiteInstance* instance) {
void RenderFrameHostManager::CreateProxiesForChildFrame(FrameTreeNode* child) {
for (const auto& pair : *proxy_hosts_) {
+ // If this proxy lives in our outer delegate process, then subframe
Charlie Reis 2015/07/28 22:36:02 Rephrase: Do not create proxies for subframes in t
lazyboy 2015/07/30 19:46:31 Done.
+ // FrameTreeNodes should not have proxy to that outer delegate.
+ if (ForInnerDelegate() && GetProxyToOuterDelegate() == pair.second)
+ continue;
+
child->render_manager()->CreateRenderFrameProxy(
pair.second->GetSiteInstance());
}
« no previous file with comments | « no previous file | testing/buildbot/chromium.fyi.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698