| Index: content/browser/tab_contents/tab_contents.cc
|
| diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
|
| index 99bba05763bd6bd653dfb49e6b74ddcda356ee1e..87070e8e98cc1415556799e4802899681b984c5a 100644
|
| --- a/content/browser/tab_contents/tab_contents.cc
|
| +++ b/content/browser/tab_contents/tab_contents.cc
|
| @@ -2425,6 +2425,7 @@ void TabContents::RunJavaScriptMessage(
|
| const std::wstring& default_prompt,
|
| const GURL& frame_url,
|
| const int flags,
|
| + const bool unload_handler_being_run,
|
| IPC::Message* reply_msg,
|
| bool* did_suppress_message) {
|
| // Suppress javascript messages when requested and when inside a constrained
|
| @@ -2433,9 +2434,11 @@ void TabContents::RunJavaScriptMessage(
|
| // Also suppress messages when showing an interstitial. The interstitial is
|
| // shown over the previous page, we don't want the hidden page dialogs to
|
| // interfere with the interstitial.
|
| + // Also suppress messages during beforeunload/unload event handlers.
|
| bool suppress_this_message =
|
| suppress_javascript_messages_ ||
|
| showing_interstitial_page() ||
|
| + unload_handler_being_run ||
|
| (delegate() && delegate()->ShouldSuppressDialogs());
|
| if (delegate())
|
| suppress_this_message |=
|
|
|