summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_modal_dialog.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-28 17:02:07 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-28 17:02:07 +0000
commit1f46007516b8ab87a9089bfab64621595b869e54 (patch)
tree7542b70956c2811c4d3ef6be53c38bbc97dabec4 /chrome/browser/app_modal_dialog.cc
parent2a4fab98a8dd8a65f16d64acb1f51d8a0076a25f (diff)
downloadchromium_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/app_modal_dialog.cc')
-rw-r--r--chrome/browser/app_modal_dialog.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/app_modal_dialog.cc b/chrome/browser/app_modal_dialog.cc
index 3cfe47f..afabff8 100644
--- a/chrome/browser/app_modal_dialog.cc
+++ b/chrome/browser/app_modal_dialog.cc
@@ -18,7 +18,8 @@ AppModalDialog::AppModalDialog(TabContents* tab_contents,
bool display_suppress_checkbox,
bool is_before_unload_dialog,
IPC::Message* reply_msg)
- : tab_contents_(tab_contents),
+ : dialog_(NULL),
+ tab_contents_(tab_contents),
title_(title),
dialog_flags_(dialog_flags),
message_text_(message_text),
@@ -62,7 +63,7 @@ void AppModalDialog::ShowModalDialog() {
// If the TabContents that created this dialog navigated away before this
// dialog became visible, simply show the next dialog if any.
if (!tab_contents_) {
- AppModalDialogQueue::ShowNextDialog();
+ Singleton<AppModalDialogQueue>()->ShowNextDialog();
delete this;
return;
}
@@ -78,7 +79,7 @@ void AppModalDialog::OnCancel() {
// that were still open in the ModalDialogQueue, which would send activation
// back to this one. The framework should be improved to handle this, so this
// is a temporary workaround.
- AppModalDialogQueue::ShowNextDialog();
+ Singleton<AppModalDialogQueue>()->ShowNextDialog();
if (tab_contents_) {
tab_contents_->OnJavaScriptMessageBoxClosed(reply_msg_, false,
@@ -88,7 +89,7 @@ void AppModalDialog::OnCancel() {
void AppModalDialog::OnAccept(const std::wstring& prompt_text,
bool suppress_js_messages) {
- AppModalDialogQueue::ShowNextDialog();
+ Singleton<AppModalDialogQueue>()->ShowNextDialog();
if (tab_contents_) {
tab_contents_->OnJavaScriptMessageBoxClosed(reply_msg_, true,