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

Unified Diff: chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc

Issue 2259403002: arc: Fix crash on window close (on close race condition). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 4 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 | chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 af304775a7bad41b9f6425ec39d8d0e1f8ebfd76..d622f7be90fe4b0fca7507ea59e31b8f5b3209f9 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
@@ -338,8 +338,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());
+ break;
+ }
}
}
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698