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

Unified Diff: chrome/browser/app_modal_dialog_gtk.cc

Issue 2803017: Fix a crash when we try to close a js dialog that wasn't shown. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Created 10 years, 6 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 | « no previous file | chrome/browser/app_modal_dialog_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_modal_dialog_gtk.cc
diff --git a/chrome/browser/app_modal_dialog_gtk.cc b/chrome/browser/app_modal_dialog_gtk.cc
index b0268e6b6be0bfb0d5e46ed16bea56ae1ca628e7..2eb91854474dc5740ccb2504a822365b614ee08e 100644
--- a/chrome/browser/app_modal_dialog_gtk.cc
+++ b/chrome/browser/app_modal_dialog_gtk.cc
@@ -31,17 +31,21 @@ void AppModalDialog::OnDialogResponse(GtkDialog* dialog, gint response_id,
}
void AppModalDialog::ActivateModalDialog() {
+ DCHECK(dialog_);
gtk_window_present(GTK_WINDOW(dialog_));
}
void AppModalDialog::CloseModalDialog() {
+ DCHECK(dialog_);
HandleDialogResponse(GTK_DIALOG(dialog_), GTK_RESPONSE_DELETE_EVENT);
}
void AppModalDialog::AcceptWindow() {
+ DCHECK(dialog_);
HandleDialogResponse(GTK_DIALOG(dialog_), GTK_RESPONSE_OK);
}
void AppModalDialog::CancelWindow() {
+ DCHECK(dialog_);
HandleDialogResponse(GTK_DIALOG(dialog_), GTK_RESPONSE_CANCEL);
}
« no previous file with comments | « no previous file | chrome/browser/app_modal_dialog_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698