| Index: chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc
|
| diff --git a/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc b/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc
|
| index a1c72f0e8e3dec5a2ef9cd946f2efa57c3d6753b..47d4b82cab0a14d628231dd8923b3a12d9062b07 100644
|
| --- a/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc
|
| +++ b/chrome/browser/ui/app_modal_dialogs/js_modal_dialog.cc
|
| @@ -115,8 +115,6 @@ void JavaScriptAppModalDialog::OnCancel(bool suppress_js_messages) {
|
| if (suppress_js_messages)
|
| delegate_->SetSuppressMessageBoxes(true);
|
| }
|
| -
|
| - Cleanup();
|
| }
|
|
|
| void JavaScriptAppModalDialog::OnAccept(const std::wstring& prompt_text,
|
| @@ -128,28 +126,12 @@ void JavaScriptAppModalDialog::OnAccept(const std::wstring& prompt_text,
|
| if (suppress_js_messages)
|
| delegate_->SetSuppressMessageBoxes(true);
|
| }
|
| -
|
| - Cleanup();
|
| }
|
|
|
| void JavaScriptAppModalDialog::OnClose() {
|
| - Cleanup();
|
| -}
|
| -
|
| -void JavaScriptAppModalDialog::Cleanup() {
|
| - if (skip_this_dialog_) {
|
| - // We can't use the |delegate_|, because we might be in the process of
|
| - // destroying it.
|
| - if (tab_contents_)
|
| - tab_contents_->OnMessageBoxClosed(reply_msg_, false, L"");
|
| -// The extension_host_ will always be a dirty pointer on OS X because the alert
|
| -// window will cause the extension popup to close since it is resigning its key
|
| -// state, destroying the host. http://crbug.com/29355
|
| -#if !defined(OS_MACOSX)
|
| - else if (extension_host_)
|
| - extension_host_->OnMessageBoxClosed(reply_msg_, false, L"");
|
| - else
|
| - NOTREACHED();
|
| -#endif
|
| + if (!skip_this_dialog_) {
|
| + delegate_->OnMessageBoxClosed(reply_msg_, true, L"");
|
| + // TODO(aa): It would be good to handle supress here, too, but we need to
|
| + // get passed the bit.
|
| }
|
| }
|
|
|