| Index: chrome/browser/ui/ash/ash_init.cc
|
| diff --git a/chrome/browser/ui/ash/ash_init.cc b/chrome/browser/ui/ash/ash_init.cc
|
| index 3b1214b09a37e51cb7599a42db9143af9c6eef82..8cfd74d117a6d758a463160f20ac9fe20cca3847 100644
|
| --- a/chrome/browser/ui/ash/ash_init.cc
|
| +++ b/chrome/browser/ui/ash/ash_init.cc
|
| @@ -11,6 +11,7 @@
|
| #include "ash/magnifier/partial_magnification_controller.h"
|
| #include "ash/shell.h"
|
| #include "base/command_line.h"
|
| +#include "chrome/browser/browser_shutdown.h"
|
| #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
|
| #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
|
| #include "chrome/browser/lifetime/application_lifetime.h"
|
| @@ -82,8 +83,12 @@
|
| }
|
|
|
| void CloseAsh() {
|
| - if (ash::Shell::HasInstance())
|
| + // If shutdown is initiated by |BrowserX11IOErrorHandler|, don't
|
| + // try to cleanup resources.
|
| + if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers() &&
|
| + ash::Shell::HasInstance()) {
|
| ash::Shell::DeleteInstance();
|
| + }
|
| }
|
|
|
| } // namespace chrome
|
|
|