Index: content/renderer/render_view_impl.cc |
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc |
index 3f7c05a8bb21ae39e8c5d897bd46afed27f941f2..ca38d54e7f3245f9275d62248801dd4ab8cfff4c 100644 |
--- a/content/renderer/render_view_impl.cc |
+++ b/content/renderer/render_view_impl.cc |
@@ -686,7 +686,7 @@ void RenderViewImpl::Initialize(const ViewMsg_New_Params& params, |
if (params.main_frame_routing_id != MSG_ROUTING_NONE) { |
main_render_frame_ = RenderFrameImpl::CreateMainFrame( |
this, params.main_frame_routing_id, params.main_frame_widget_routing_id, |
- params.hidden, screen_info(), compositor_deps_); |
+ params.hidden, screen_info(), compositor_deps_, opener_frame); |
} |
if (params.proxy_routing_id != MSG_ROUTING_NONE) { |
@@ -699,11 +699,9 @@ void RenderViewImpl::Initialize(const ViewMsg_New_Params& params, |
main_render_frame_->set_render_frame_proxy(proxy); |
} else { |
CHECK(SiteIsolationPolicy::IsSwappedOutStateForbidden()); |
- // Pass MSG_ROUTING_NONE for opener, since actual opener (if any) will be |
- // set separately below. |
- RenderFrameProxy::CreateFrameProxy(params.proxy_routing_id, routing_id(), |
- MSG_ROUTING_NONE, MSG_ROUTING_NONE, |
- params.replicated_frame_state); |
+ RenderFrameProxy::CreateFrameProxy( |
+ params.proxy_routing_id, routing_id(), params.opener_frame_route_id, |
+ MSG_ROUTING_NONE, params.replicated_frame_state); |
} |
} |
@@ -808,8 +806,6 @@ void RenderViewImpl::Initialize(const ViewMsg_New_Params& params, |
// If we have an opener_frame but we weren't created by a renderer, then it's |
// the browser asking us to set our opener to another frame. |
alexmos
2016/02/26 19:55:34
You might want to update this comment, since we do
dcheng
2016/02/26 22:52:29
Hmm... what would you suggest for this comment? It
alexmos
2016/02/26 23:54:47
I just thought it was confusing that it talks abou
dcheng
2016/02/27 01:41:21
Done. I also collapsed the two if blocks together.
|
if (opener_frame && !was_created_by_renderer) { |
- webview()->mainFrame()->setOpener(opener_frame); |
- |
// Ensure that sandbox flags are inherited from an opener in a different |
Charlie Reis
2016/02/25 01:08:08
I'm wondering if the rest of this block needs any
dcheng
2016/02/25 01:13:28
Maybe… but this patch has affected a lot more plum
Charlie Reis
2016/02/25 21:21:25
Separate patch is fine. Just wanted to raise the
alexmos
2016/02/26 19:55:34
Yes, this is specific to the main frame (the scena
dcheng
2016/02/27 01:41:21
createWindow() doesn't *always* create a new windo
|
// process. In that case, the browser process will set any inherited |
// sandbox flags in |replicated_frame_state|, so apply them here. |