Chromium Code Reviews| 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 3362cc1b63417be749ef6832eabd73c03b175083..9779af39ede349e55b19f490bf760b1c63f1f7ef 100644 |
| --- a/content/browser/web_contents/web_contents_impl.cc |
| +++ b/content/browser/web_contents/web_contents_impl.cc |
| @@ -4552,7 +4552,6 @@ void WebContentsImpl::RendererUnresponsive( |
| // See http://crbug.com/65458 |
| if (DevToolsAgentHost::IsDebuggerAttached(this)) |
| return; |
| - |
| if (rfhi->is_waiting_for_beforeunload_ack() || |
| rfhi->IsWaitingForUnloadACK()) { |
| // Hang occurred while firing the beforeunload/unload handler. |
| @@ -4571,6 +4570,10 @@ void WebContentsImpl::RendererUnresponsive( |
| bool close = true; |
| if (rfhi->is_waiting_for_beforeunload_ack() && delegate_) { |
| delegate_->BeforeUnloadFired(this, true, &close); |
| + // Reset flag so we don't get duplicate of of ACK or run into |
| + // situation when we have both |is_waiting_for_beforeunload_ack| and |
| + // |IsWaitingForUnloadACK| on. |
| + rfhi->DontWaitForBeforeUnloadAck(); |
|
Charlie Reis
2016/05/13 22:24:01
I wonder if we should expose and call RFHI::OnBefo
Mikhail Goncharov
2016/05/16 05:02:01
I have inspected RenderFrameHostImpl::OnBeforeUnlo
|
| } |
| if (close) |
| Close(); |