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 19d9d26bb515dabebf7fc2b03b581dc393474d66..c0acb735688cdd43fbc1a4fcdfb5739b136768dc 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -4092,10 +4092,9 @@ void WebContentsImpl::RunJavaScriptMessage( |
// Suppress JavaScript dialogs when requested. Also suppress messages when |
// showing an interstitial as it's shown over the previous page and we don't |
// want the hidden page's dialogs to interfere with the interstitial. |
- bool suppress_this_message = |
- ShowingInterstitialPage() || !delegate_ || |
- delegate_->ShouldSuppressDialogs(this) || |
- !delegate_->GetJavaScriptDialogManager(this); |
+ bool suppress_this_message = ShowingInterstitialPage() || !delegate_ || |
+ delegate_->ShouldSuppressDialogs(this, false) || |
+ !delegate_->GetJavaScriptDialogManager(this); |
if (!suppress_this_message) { |
dialog_manager_ = delegate_->GetJavaScriptDialogManager(this); |
@@ -4128,11 +4127,10 @@ void WebContentsImpl::RunBeforeUnloadConfirm( |
if (delegate_) |
delegate_->WillRunBeforeUnloadConfirm(); |
- bool suppress_this_message = |
- !rfhi->is_active() || |
- ShowingInterstitialPage() || !delegate_ || |
- delegate_->ShouldSuppressDialogs(this) || |
- !delegate_->GetJavaScriptDialogManager(this); |
+ bool suppress_this_message = !rfhi->is_active() || |
+ ShowingInterstitialPage() || !delegate_ || |
+ delegate_->ShouldSuppressDialogs(this, true) || |
+ !delegate_->GetJavaScriptDialogManager(this); |
if (suppress_this_message) { |
rfhi->JavaScriptDialogClosed(reply_msg, true, base::string16(), true); |
return; |