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

Unified Diff: chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm

Issue 819083002: Fix AppModalDialogHelper to deal with a TabStrip without an active tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
Index: chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
index 287a887884725fce8d2a5206c34734bc9d5e6ec9..34c66e2572c61806b57439c2ca2578abe1c9120b 100644
--- a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
@@ -224,7 +224,8 @@ enum AlertAction {
JavaScriptAppModalDialogCocoa::JavaScriptAppModalDialogCocoa(
app_modal::JavaScriptAppModalDialog* dialog)
: dialog_(dialog),
- popup_helper_(new AppModalDialogHelper(dialog->web_contents())),
+ popup_helper_(
+ new AppModalDialogHelper(dialog ? dialog->web_contents() : NULL)),
Bernhard Bauer 2014/12/22 13:18:35 nullptr
Bernhard Bauer 2014/12/22 13:18:35 Also, instead of doing this `dialog ? dialog->web_
is_showing_(false) {
// Determine the names of the dialog buttons based on the flags. "Default"
// is the OK button. "Other" is the cancel button. We don't use the

Powered by Google App Engine
This is Rietveld 408576698