diff options
author | pam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-02 23:27:15 +0000 |
---|---|---|
committer | pam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-02 23:27:15 +0000 |
commit | 4ed438099c616c4e21e9a6099b8f27fbc9eb3011 (patch) | |
tree | 3f6147d9c7619cbbcdbfd51e4bc43225141c2a7b /chrome/browser/app_modal_dialog_queue.cc | |
parent | 5a05c47ae2a497d4efbbb9166fa5ff7aebfd4ecf (diff) | |
download | chromium_src-4ed438099c616c4e21e9a6099b8f27fbc9eb3011.zip chromium_src-4ed438099c616c4e21e9a6099b8f27fbc9eb3011.tar.gz chromium_src-4ed438099c616c4e21e9a6099b8f27fbc9eb3011.tar.bz2 |
Set active_dialog_ before showing it, since showing a dialog can sometimes
actually move to the next one in the queue instead.
BUG=26398
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. Especially make sure http://crbug.com/10699 doesn't recur.
Review URL: http://codereview.chromium.org/339094
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/app_modal_dialog_queue.cc')
-rw-r--r-- | chrome/browser/app_modal_dialog_queue.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/app_modal_dialog_queue.cc b/chrome/browser/app_modal_dialog_queue.cc index 2ab1398..d567485 100644 --- a/chrome/browser/app_modal_dialog_queue.cc +++ b/chrome/browser/app_modal_dialog_queue.cc @@ -30,6 +30,8 @@ void AppModalDialogQueue::ActivateModalDialog() { } void AppModalDialogQueue::ShowModalDialog(AppModalDialog* dialog) { - dialog->ShowModalDialog(); + // Set active_dialog_ before showing it, because ShowModalDialog can wind up + // calling ShowNextDialog in some cases, which will change active_dialog_. active_dialog_ = dialog; + dialog->ShowModalDialog(); } |