Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6140)

Unified Diff: chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc

Issue 10828423: Fix a Windows crash bug with javascript alerts from extension popups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
diff --git a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
index dd6732f3565c1aba96b54c68ec901aee7f2e9ddd..e5b7c767360175a42f887c8b97edb2b4167a3787 100644
--- a/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
+++ b/chrome/browser/ui/app_modal_dialogs/app_modal_dialog.cc
@@ -18,10 +18,12 @@ AppModalDialog::AppModalDialog(WebContents* web_contents, const string16& title)
: valid_(true),
native_dialog_(NULL),
title_(title),
- web_contents_(web_contents) {
+ web_contents_(web_contents),
+ completed_(false) {
}
AppModalDialog::~AppModalDialog() {
+ CompleteDialog();
}
void AppModalDialog::ShowModalDialog() {
@@ -62,5 +64,8 @@ void AppModalDialog::CloseModalDialog() {
}
void AppModalDialog::CompleteDialog() {
- AppModalDialogQueue::GetInstance()->ShowNextDialog();
+ if (!completed_) {
+ completed_ = true;
+ AppModalDialogQueue::GetInstance()->ShowNextDialog();
+ }
}
« no previous file with comments | « chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698