Chromium Code Reviews| Index: chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc |
| diff --git a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc |
| index a5d68fbea957f5b05f0ba48185d1ff4e1fafdcc5..8ccca6d8158d98a048a1e4b2c52d4bb0da445ccf 100644 |
| --- a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc |
| +++ b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc |
| @@ -332,8 +332,10 @@ void ArcAppWindowLauncherController::OnWindowDestroying(aura::Window* window) { |
| window->RemoveObserver(this); |
| for (auto& it : task_id_to_app_window_) { |
| - if (it.second->widget() == views::Widget::GetWidgetForNativeWindow(window)) |
| - it.second->set_widget(nullptr); |
| + if (it.second->GetNativeWindow() == window) { |
| + OnTaskDestroyed(it.second->task_id()); |
|
khmel
2016/08/18 16:09:29
Fix race condition on Close (Close event before On
|
| + break; |
| + } |
| } |
| } |