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 d7b5686b9f8ec631b0b3de789ef6a6700c85fd1c..c9618111c0b75603756763f6ae36bb77be732706 100644 |
--- a/content/browser/renderer_host/render_view_host_impl.cc |
+++ b/content/browser/renderer_host/render_view_host_impl.cc |
@@ -577,6 +577,11 @@ void RenderViewHostImpl::SuppressDialogsUntilSwapOut() { |
} |
void RenderViewHostImpl::SwapOut() { |
+ // If this RenderViewHost is not in the default state, it must have already |
+ // gone through this, therefore just return. |
+ if (rvh_state_ != STATE_DEFAULT) |
+ return; |
+ |
SetState(STATE_WAITING_FOR_UNLOAD_ACK); |
unload_event_monitor_timeout_->Start( |
base::TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); |