| 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 1fb9201c58d29fbde43c47ce8305b46c99893df0..ecc41d943f05043886caf65ce83c5388c5b55236 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -4069,10 +4069,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);
|
| @@ -4105,11 +4104,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;
|
|
|