| Index: content/browser/web_contents/web_contents_impl.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
| index 46a226f7c67434387fa3d2765c8253817d999130..4d9c72edbcdba65ca6c3d0b95d1a2238ea4c490f 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -4908,14 +4908,17 @@ bool WebContentsImpl::CreateRenderViewForRenderManager(
|
| TRACE_EVENT0("browser,navigation",
|
| "WebContentsImpl::CreateRenderViewForRenderManager");
|
|
|
| - if (proxy_routing_id == MSG_ROUTING_NONE)
|
| + RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(render_view_host);
|
| +
|
| + // We only create a RWHV for active RenderViewHosts. When an inactive RVH is
|
| + // reused, the RWHV is created in RenderFrameHostManager::CommitPending.
|
| + if (rvhi->is_active()) {
|
| + DCHECK_EQ(MSG_ROUTING_NONE, proxy_routing_id);
|
| CreateRenderWidgetHostViewForRenderManager(render_view_host);
|
| + }
|
|
|
| - if (!static_cast<RenderViewHostImpl*>(render_view_host)
|
| - ->CreateRenderView(opener_frame_routing_id,
|
| - proxy_routing_id,
|
| - replicated_frame_state,
|
| - created_with_opener_)) {
|
| + if (!rvhi->CreateRenderView(opener_frame_routing_id, proxy_routing_id,
|
| + replicated_frame_state, created_with_opener_)) {
|
| return false;
|
| }
|
|
|
|
|