diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 17:02:07 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 17:02:07 +0000 |
commit | 1f46007516b8ab87a9089bfab64621595b869e54 (patch) | |
tree | 7542b70956c2811c4d3ef6be53c38bbc97dabec4 /chrome/browser/jsmessage_box_handler.cc | |
parent | 2a4fab98a8dd8a65f16d64acb1f51d8a0076a25f (diff) | |
download | chromium_src-1f46007516b8ab87a9089bfab64621595b869e54.zip chromium_src-1f46007516b8ab87a9089bfab64621595b869e54.tar.gz chromium_src-1f46007516b8ab87a9089bfab64621595b869e54.tar.bz2 |
This CL is a clean-up of the app_modal_dialog_queue.cc in an attempt to fix a bug 10699.
Not sure what is causing the crasher.
Hopefully after this clean-up we'll get a different stack-trace that might help.
BUG=10699
TEST=Make sure alert/confirm boxes work properly. make sure a background tab that shows a (delayed) alert box works. Same with a background browser.
Review URL: http://codereview.chromium.org/113932
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17078 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/jsmessage_box_handler.cc')
-rw-r--r-- | chrome/browser/jsmessage_box_handler.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/browser/jsmessage_box_handler.cc b/chrome/browser/jsmessage_box_handler.cc index 151a33a..3923646 100644 --- a/chrome/browser/jsmessage_box_handler.cc +++ b/chrome/browser/jsmessage_box_handler.cc @@ -68,9 +68,11 @@ void RunJavascriptMessageBox(TabContents* tab_contents, bool display_suppress_checkbox, IPC::Message* reply_msg) { std::wstring title = GetWindowTitle(tab_contents, frame_url, dialog_flags); - AppModalDialogQueue::AddDialog(new AppModalDialog(tab_contents, title, - dialog_flags, MakeTextSafe(message_text), default_prompt_text, - display_suppress_checkbox, false, reply_msg)); + Singleton<AppModalDialogQueue>()->AddDialog( + new AppModalDialog(tab_contents, title, + dialog_flags, MakeTextSafe(message_text), + default_prompt_text, display_suppress_checkbox, + false, reply_msg)); } void RunBeforeUnloadDialog(TabContents* tab_contents, @@ -79,7 +81,7 @@ void RunBeforeUnloadDialog(TabContents* tab_contents, std::wstring full_message = message_text + L"\n\n" + l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_FOOTER); - AppModalDialogQueue::AddDialog(new AppModalDialog( + Singleton<AppModalDialogQueue>()->AddDialog(new AppModalDialog( tab_contents, l10n_util::GetString(IDS_BEFOREUNLOAD_MESSAGEBOX_TITLE), MessageBoxFlags::kIsJavascriptConfirm, MakeTextSafe(message_text), std::wstring(), false, true, reply_msg)); |