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

Unified Diff: ash/shell.cc

Issue 834163002: Fixes smart deploy causing crash on shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove InstallEventBlockerForTest method. 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 | ash/virtual_keyboard_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 059c47fad73f50a9531db25f2e39d59cadf9ae98..9062d81afef808035530897d9c50fbcfab07187f 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -694,6 +694,12 @@ Shell::~Shell() {
// TooltipController is deleted with the Shell so removing its references.
RemovePreTargetHandler(tooltip_controller_.get());
+// Destroy the virtual keyboard controller before the maximize mode controller
+// since the latters destructor triggers events that the former is listening
+// to but no longer cares about.
+#if defined(OS_CHROMEOS)
+ virtual_keyboard_controller_.reset();
+#endif
// Destroy maximize mode controller early on since it has some observers which
// need to be removed.
maximize_mode_controller_->Shutdown();
@@ -793,9 +799,6 @@ Shell::~Shell() {
display_manager_->CreateScreenForShutdown();
display_controller_->Shutdown();
display_controller_.reset();
-#if defined(OS_CHROMEOS)
- virtual_keyboard_controller_.reset();
-#endif
screen_position_controller_.reset();
accessibility_delegate_.reset();
new_window_delegate_.reset();
« no previous file with comments | « no previous file | ash/virtual_keyboard_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698