Chromium Code Reviews| Index: content/browser/renderer_host/render_view_host_impl.cc |
| diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc |
| index 4e81849d222a27d2e458cb6ff239ea2f4f4749de..3f6a07dbd7d3a19d928cea95727168b33edabb3b 100644 |
| --- a/content/browser/renderer_host/render_view_host_impl.cc |
| +++ b/content/browser/renderer_host/render_view_host_impl.cc |
| @@ -28,6 +28,7 @@ |
| #include "content/browser/child_process_security_policy_impl.h" |
| #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| #include "content/browser/frame_host/frame_tree.h" |
| +#include "content/browser/frame_host/render_frame_proxy_host.h" |
| #include "content/browser/gpu/compositor_util.h" |
| #include "content/browser/gpu/gpu_data_manager_impl.h" |
| #include "content/browser/gpu/gpu_process_host.h" |
| @@ -329,9 +330,16 @@ bool RenderViewHostImpl::CreateRenderView( |
| params.max_size = max_size_for_auto_resize(); |
| GetResizeParams(¶ms.initial_size); |
| if (!is_active_) { |
| - params.replicated_frame_state = |
| - static_cast<RenderFrameHostImpl*>(GetMainFrame())->frame_tree_node() |
| - ->current_replication_state(); |
| + if (main_frame_routing_id_ != MSG_ROUTING_NONE) { |
| + params.replicated_frame_state = |
|
Charlie Reis
2015/06/04 00:02:11
Maybe we should just pass in the FrameReplicationS
nasko
2015/06/04 16:45:08
Done.
|
| + static_cast<RenderFrameHostImpl*>(GetMainFrame())->frame_tree_node() |
| + ->current_replication_state(); |
| + } else { |
| + CHECK_NE(params.proxy_routing_id, MSG_ROUTING_NONE); |
| + params.replicated_frame_state = |
| + RenderFrameProxyHost::FromID(GetProcess()->GetID(), proxy_route_id) |
| + ->frame_tree_node()->current_replication_state(); |
| + } |
| } |
| if (!Send(new ViewMsg_New(params))) |
| @@ -355,8 +363,10 @@ bool RenderViewHostImpl::CreateRenderView( |
| // Since this method creates the main RenderFrame in the renderer process, |
|
Charlie Reis
2015/06/04 00:02:11
can create
nasko
2015/06/04 14:57:13
Done.
|
| // set the proper state on its corresponding RenderFrameHost. |
| - RenderFrameHostImpl::FromID(GetProcess()->GetID(), main_frame_routing_id_) |
| - ->SetRenderFrameCreated(true); |
| + if (main_frame_routing_id_ != MSG_ROUTING_NONE) { |
| + RenderFrameHostImpl::FromID(GetProcess()->GetID(), main_frame_routing_id_) |
| + ->SetRenderFrameCreated(true); |
| + } |
| return true; |
| } |