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

Unified Diff: chrome/browser/js_modal_dialog.cc

Issue 2827029: Merge 50561 - Fix a crash when we try to close a js dialog that wasn't shown.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/375/src/
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 | « chrome/browser/app_modal_dialog_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/js_modal_dialog.cc
===================================================================
--- chrome/browser/js_modal_dialog.cc (revision 51020)
+++ chrome/browser/js_modal_dialog.cc (working copy)
@@ -20,6 +20,9 @@
bool is_before_unload_dialog,
IPC::Message* reply_msg)
: AppModalDialog(client->AsTabContents(), title),
+#if defined(OS_MACOSX)
+ dialog_(NULL),
+#endif
client_(client),
extension_host_(client->AsExtensionHost()),
dialog_flags_(dialog_flags),
@@ -51,7 +54,8 @@
// Also clear the client, since it's now invalid.
skip_this_dialog_ = true;
client_ = NULL;
- CloseModalDialog();
+ if (dialog_)
+ CloseModalDialog();
}
void JavaScriptAppModalDialog::InitNotifications() {
@@ -123,4 +127,3 @@
}
AppModalDialog::Cleanup();
}
-
« no previous file with comments | « chrome/browser/app_modal_dialog_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698