| Index: content/browser/tab_contents/render_view_host_manager.cc
|
| diff --git a/content/browser/tab_contents/render_view_host_manager.cc b/content/browser/tab_contents/render_view_host_manager.cc
|
| index d08f6abc332278958a504bf9c038105c8726d455..73b19d46998bb5d159f4ad393cab84af3cefb725 100644
|
| --- a/content/browser/tab_contents/render_view_host_manager.cc
|
| +++ b/content/browser/tab_contents/render_view_host_manager.cc
|
| @@ -215,6 +215,12 @@ void RenderViewHostManager::RendererAbortedProvisionalLoad(
|
| // the response is not a download.
|
| }
|
|
|
| +void RenderViewHostManager::RendererProcessClosing(
|
| + RenderProcessHost* render_process_host) {
|
| + // TODO(creis): Don't schedule new navigations in RenderViewHosts of this
|
| + // process. (Part of http://crbug.com/65953.)
|
| +}
|
| +
|
| void RenderViewHostManager::ShouldClosePage(bool for_cross_site_transition,
|
| bool proceed) {
|
| if (for_cross_site_transition) {
|
| @@ -463,6 +469,9 @@ bool RenderViewHostManager::CreatePendingRenderView(
|
| instance, render_view_delegate_, MSG_ROUTING_NONE, delegate_->
|
| GetControllerForRenderManager().session_storage_namespace());
|
|
|
| + // Prevent the process from exiting while we're trying to use it.
|
| + pending_render_view_host_->process()->AddPendingView();
|
| +
|
| bool success = InitRenderView(pending_render_view_host_, entry);
|
| if (success) {
|
| // Don't show the view until we get a DidNavigate from it.
|
| @@ -526,6 +535,9 @@ void RenderViewHostManager::CommitPending() {
|
| render_view_host_ = pending_render_view_host_;
|
| pending_render_view_host_ = NULL;
|
|
|
| + // The process will no longer try to exit, so we can decrement the count.
|
| + render_view_host_->process()->RemovePendingView();
|
| +
|
| // If the view is gone, then this RenderViewHost died while it was hidden.
|
| // We ignored the RenderViewGone call at the time, so we should send it now
|
| // to make sure the sad tab shows up, etc.
|
| @@ -663,6 +675,9 @@ void RenderViewHostManager::CancelPending() {
|
| pending_render_view_host_ = NULL;
|
| pending_render_view_host->Shutdown();
|
|
|
| + // We no longer need to prevent the process from exiting.
|
| + pending_render_view_host->process()->RemovePendingView();
|
| +
|
| pending_web_ui_.reset();
|
| }
|
|
|
|
|