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

Unified Diff: chrome/browser/lifetime/application_lifetime_aura.cc

Issue 10952028: Fix crashers in GetPrimaryDisplay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« ash/display/display_controller.h ('K') | « ash/screen_ash.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/lifetime/application_lifetime_aura.cc
diff --git a/chrome/browser/lifetime/application_lifetime_aura.cc b/chrome/browser/lifetime/application_lifetime_aura.cc
index dae1f3eeff01ffe41cf320e10f19f18df47d73ff..4bd1f039403a2224d55256575a417be9180b3cb2 100644
--- a/chrome/browser/lifetime/application_lifetime_aura.cc
+++ b/chrome/browser/lifetime/application_lifetime_aura.cc
@@ -19,13 +19,18 @@ namespace browser {
void HandleAppExitingForPlatform() {
// Close all non browser windows now. Those includes notifications
// and windows created by Ash (launcher, background, etc).
- g_browser_process->notification_ui_manager()->CancelAll();
-
#if defined(USE_ASH)
- // Releasing the capture will close any menus that might be open:
- // http://crbug.com/134472
- aura::client::GetCaptureClient(ash::Shell::GetPrimaryRootWindow())->
- SetCapture(NULL);
+ // This may be called before ASH is initialized when XIOError is reported.
Daniel Erat 2012/09/19 20:47:33 nit: s/ASH/Ash/ or just "ash"
oshima 2012/09/19 21:21:28 changed to |ash::Shell|
+ // crbug.com/150633.
+ if (ash::Shell::HasInstance()) {
+ g_browser_process->notification_ui_manager()->CancelAll();
+ // Releasing the capture will close any menus that might be open:
+ // http://crbug.com/134472
+ aura::client::GetCaptureClient(ash::Shell::GetPrimaryRootWindow())->
+ SetCapture(NULL);
+ }
+#else
+ g_browser_process->notification_ui_manager()->CancelAll();
#endif
// TODO(oshima): Close all non browser windows here while
« ash/display/display_controller.h ('K') | « ash/screen_ash.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698