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

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

Issue 822083004: Mac: Fix crash when opening Incognito window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@FirstResponder
Patch Set: Created 5 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index c22f121ed44bb8f752ca8d52052e11ee0fcbf843..5fde5b9a7d258c6e36bcefcf89a1672ab5098f54 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -627,8 +627,12 @@ using content::WebContents;
if ([self isInAnyFullscreenMode])
[floatingBarBackingView_ setNeedsDisplay:YES]; // Okay even if nil.
- extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile())->
- set_registry_for_active_window(extension_keybinding_registry_.get());
+ auto registry =
+ extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile());
+ if (registry) {
+ registry->set_registry_for_active_window(
+ extension_keybinding_registry_.get());
+ }
Finnur 2015/01/23 10:49:38 Hmm... I'm not sure this is the right fix... We s
Andre 2015/01/23 18:24:01 Thanks Finnur. When recording a shortcut for an ex
}
- (void)windowDidResignMain:(NSNotification*)notification {
@@ -640,8 +644,10 @@ using content::WebContents;
if ([self isInAnyFullscreenMode])
[floatingBarBackingView_ setNeedsDisplay:YES]; // Okay even if nil.
- extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile())->
- set_registry_for_active_window(nullptr);
+ auto registry =
+ extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile());
+ if (registry)
+ registry->set_registry_for_active_window(nullptr);
}
// Called when we are activated (when we gain focus).
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698