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

Unified Diff: ash/common/accelerators/accelerator_controller.cc

Issue 2615743002: cros: Fix clusterfuzz crash when spawning app list very early in startup (Closed)
Patch Set: Created 3 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 | « ash/app_list/app_list_presenter_delegate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/accelerators/accelerator_controller.cc
diff --git a/ash/common/accelerators/accelerator_controller.cc b/ash/common/accelerators/accelerator_controller.cc
index db032bb3a8cafe407d68f3628775a7d7165a25af..8e6c3c529bf8e8b55016d0f84d7a94a05e66551c 100644
--- a/ash/common/accelerators/accelerator_controller.cc
+++ b/ash/common/accelerators/accelerator_controller.cc
@@ -269,6 +269,13 @@ void HandleSwitchIme(ImeControlDelegate* ime_control_delegate,
bool CanHandleToggleAppList(const ui::Accelerator& accelerator,
const ui::Accelerator& previous_accelerator) {
+ // Some tests try to spawn the app list before the shelf is created, but the
+ // app list depends on the shelf for positioning. Users never open the app
msw 2017/01/05 00:41:34 The app list doesn't actually depend on the shelf
+ // list that early, so disable showing it. http://crbug.com/676843
+ WmWindow* target_root = WmShell::Get()->GetRootWindowForNewWindows();
+ if (!WmShelf::ForWindow(target_root)->IsShelfInitialized())
+ return false;
+
if (accelerator.key_code() == ui::VKEY_LWIN) {
// If something else was pressed between the Search key (LWIN)
// being pressed and released, then ignore the release of the
« no previous file with comments | « ash/app_list/app_list_presenter_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698