| 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 791eb89285c912ad392802815b6a6b94c6214be6..116ea68a667a33c205a8989f3244bce09ee43706 100644
|
| --- a/content/browser/frame_host/render_frame_host_manager.cc
|
| +++ b/content/browser/frame_host/render_frame_host_manager.cc
|
| @@ -503,7 +503,7 @@ void RenderFrameHostManager::DidDisownOpener(RenderViewHost* render_view_host) {
|
|
|
| void RenderFrameHostManager::RendererProcessClosing(
|
| RenderProcessHost* render_process_host) {
|
| - // Remove any swapped out RVHs from this process, so that we don't try to
|
| + // Remove any swapped out RFHs from this process, so that we don't try to
|
| // swap them back in while the process is exiting. Start by finding them,
|
| // since there could be more than one.
|
| std::list<int> ids_to_remove;
|
| @@ -516,7 +516,13 @@ void RenderFrameHostManager::RendererProcessClosing(
|
|
|
| // Now delete them.
|
| while (!ids_to_remove.empty()) {
|
| - delete swapped_out_hosts_[ids_to_remove.back()];
|
| + RenderFrameHostImpl* rfh = swapped_out_hosts_[ids_to_remove.back()];
|
| + // The pending RFH may be on the swapped out list if we started to swap it
|
| + // back in.
|
| + if (rfh == pending_render_frame_host_.get())
|
| + CancelPending();
|
| + else
|
| + delete swapped_out_hosts_[ids_to_remove.back()];
|
| swapped_out_hosts_.erase(ids_to_remove.back());
|
| ids_to_remove.pop_back();
|
| }
|
|
|