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 b6282abb783303809d986e8b4df9d4bff13f412c..b61660d8ba8717cdf9f09ca77fe2231965e9ca26 100644 |
--- a/content/browser/frame_host/render_frame_host_impl.cc |
+++ b/content/browser/frame_host/render_frame_host_impl.cc |
@@ -2943,8 +2943,7 @@ void RenderFrameHostImpl::DeleteSurroundingTextInCodePoints(int before, |
void RenderFrameHostImpl::JavaScriptDialogClosed( |
IPC::Message* reply_msg, |
bool success, |
- const base::string16& user_input, |
- bool dialog_was_suppressed) { |
+ const base::string16& user_input) { |
GetProcess()->SetIgnoreInputEvents(false); |
SendJavaScriptDialogReply(reply_msg, success, user_input); |
@@ -2953,17 +2952,10 @@ void RenderFrameHostImpl::JavaScriptDialogClosed( |
// timers stopped in this frame or a frame up in the frame hierarchy. Restart |
// any timers that were stopped in OnRunBeforeUnloadConfirm(). |
for (RenderFrameHostImpl* frame = this; frame; frame = frame->GetParent()) { |
- if (frame->is_waiting_for_beforeunload_ack_) { |
- // If we are waiting for a beforeunload ack and the user has suppressed |
- // messages, kill the tab immediately. A page that's spamming is |
- // presumably malicious, so there's no point in continuing to run its |
- // script and dragging out the process. |
- if (dialog_was_suppressed) { |
- frame->SimulateBeforeUnloadAck(); |
- } else if (frame->beforeunload_timeout_) { |
- frame->beforeunload_timeout_->Start( |
- TimeDelta::FromMilliseconds(RenderViewHostImpl::kUnloadTimeoutMS)); |
- } |
+ if (frame->is_waiting_for_beforeunload_ack_ && |
+ frame->beforeunload_timeout_) { |
+ frame->beforeunload_timeout_->Start( |
+ TimeDelta::FromMilliseconds(RenderViewHostImpl::kUnloadTimeoutMS)); |
} |
} |
} |