Chromium Code Reviews| Index: ash/root_window_controller.cc |
| diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc |
| index 743160facc58f1448272b7cb81cc1872f0f9815a..1ce3d774cb384f608becf44b4ae8a9d79a7b59e2 100644 |
| --- a/ash/root_window_controller.cc |
| +++ b/ash/root_window_controller.cc |
| @@ -575,8 +575,6 @@ void RootWindowController::CloseChildWindows() { |
| if (shelf_widget_) |
| shelf_widget_->Shutdown(); |
| - wm_shelf_aura_->Shutdown(); |
| - |
| // Close background widget first as it depends on tooltip. |
| wallpaper_controller_.reset(); |
| animating_wallpaper_controller_.reset(); |
| @@ -616,6 +614,10 @@ void RootWindowController::CloseChildWindows() { |
| } |
| shelf_widget_.reset(); |
| + // CloseChildWindows may be called twice during the shutdown of ash unittests. |
|
James Cook
2016/08/17 03:29:39
Ugh. Thanks for documenting it.
msw
2016/08/17 17:45:44
Acknowledged. We can try to fix this separately.
|
| + // Avoid notifying WmShelf that the Shelf instance has been destroyed twice. |
| + if (wm_shelf_aura_->shelf()) |
| + wm_shelf_aura_->ClearShelf(); |
| shelf_.reset(); |
| } |