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

Unified Diff: services/ui/ws/window_manager_state.cc

Issue 2365243003: Fixes possible crash in ~Display (Closed)
Patch Set: Created 4 years, 3 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 | services/ui/ws/window_manager_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_manager_state.cc
diff --git a/services/ui/ws/window_manager_state.cc b/services/ui/ws/window_manager_state.cc
index 93b3d3cde76d15cbce86a6f860f7faea12770a9f..68454b4cdd514a8ff4432edc8cc6c3e2686a77e4 100644
--- a/services/ui/ws/window_manager_state.cc
+++ b/services/ui/ws/window_manager_state.cc
@@ -119,6 +119,9 @@ WindowManagerState::WindowManagerState(WindowTree* window_tree)
}
WindowManagerState::~WindowManagerState() {
+ for (auto& display_root : window_manager_display_roots_)
+ display_root->display()->OnWillDestroyTree(window_tree_);
+
for (auto& display_root : orphaned_window_manager_display_roots_)
display_root->root()->RemoveObserver(this);
}
« no previous file with comments | « no previous file | services/ui/ws/window_manager_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698