Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2704383007: Always restart the hung page timer after a beforeunload dialog. (Closed)
Patch Set: fixes Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 307e3fc64903bfe5bd14401e86a16e665fcc792a..995ed1f4fa11bdfe2cf47ac08219e8e4d07c7ae7 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4213,7 +4213,9 @@ void WebContentsImpl::RunBeforeUnloadConfirm(
delegate_->ShouldSuppressDialogs(this) ||
!delegate_->GetJavaScriptDialogManager(this);
if (suppress_this_message) {
- rfhi->JavaScriptDialogClosed(reply_msg, true, base::string16(), true);
+ rfhi->JavaScriptDialogClosed(reply_msg, true, base::string16(),
+ /*is_before_unload_dialog=*/true,
+ /*dialog_was_suppressed=*/true);
return;
}
@@ -5143,15 +5145,17 @@ void WebContentsImpl::OnDialogClosed(int render_process_id,
observer.BeforeUnloadDialogCancelled();
}
- is_showing_javascript_dialog_ = false;
- is_showing_before_unload_dialog_ = false;
if (rfh) {
rfh->JavaScriptDialogClosed(reply_msg, success, user_input,
+ is_showing_before_unload_dialog_,
dialog_was_suppressed);
} else {
// Don't leak the sync IPC reply if the RFH or process is gone.
delete reply_msg;
}
+
+ is_showing_javascript_dialog_ = false;
+ is_showing_before_unload_dialog_ = false;
}
void WebContentsImpl::SetEncoding(const std::string& encoding) {
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698