Index: content/browser/frame_host/render_frame_host_impl.cc |
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
index 069f5b5d1fb9e89f780a74048084610515efd789..175825372ad31515286cfc625b2d82743139d562 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -1669,7 +1669,7 @@ void RenderFrameHostImpl::OnRunJavaScriptDialog( |
JavaScriptDialogType dialog_type, |
IPC::Message* reply_msg) { |
if (!is_active()) { |
- JavaScriptDialogClosed(reply_msg, true, base::string16(), true); |
+ JavaScriptDialogClosed(false, reply_msg, true, base::string16(), true); |
return; |
} |
@@ -2602,12 +2602,13 @@ void RenderFrameHostImpl::DeleteSurroundingText(size_t before, size_t after) { |
} |
void RenderFrameHostImpl::JavaScriptDialogClosed( |
+ bool is_before_unload_dialog, |
IPC::Message* reply_msg, |
bool success, |
const base::string16& user_input, |
bool dialog_was_suppressed) { |
GetProcess()->SetIgnoreInputEvents(false); |
- bool is_waiting = is_waiting_for_beforeunload_ack_ || IsWaitingForUnloadACK(); |
+ bool is_waiting = is_before_unload_dialog || IsWaitingForUnloadACK(); |
Charlie Reis
2017/02/27 18:41:41
Could the same bug affect IsWaitingForUnloadACK()?
Avi (use Gerrit)
2017/02/27 19:28:49
I just got my brain around is_waiting_for_beforeun
Charlie Reis
2017/02/27 21:03:16
Yeah, throughout this method. We might want to sa
|
// If we are executing as part of (before)unload event handling, we don't |
// want to use the regular hung_renderer_delay_ms_ if the user has agreed to |
@@ -2617,7 +2618,7 @@ void RenderFrameHostImpl::JavaScriptDialogClosed( |
RendererUnresponsiveType type = |
RendererUnresponsiveType::RENDERER_UNRESPONSIVE_DIALOG_CLOSED; |
if (success) { |
- type = is_waiting_for_beforeunload_ack_ |
+ type = is_before_unload_dialog |
? RendererUnresponsiveType::RENDERER_UNRESPONSIVE_BEFORE_UNLOAD |
: RendererUnresponsiveType::RENDERER_UNRESPONSIVE_UNLOAD; |
} |