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

Unified Diff: services/ui/ws/window_server.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 | « services/ui/ws/window_manager_state_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_server.cc
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
index e02e3c84bb2681f73d44cb28d41ac7cc8d0de2f3..2f306592065c39698942d4da2d83250406d5944f 100644
--- a/services/ui/ws/window_server.cc
+++ b/services/ui/ws/window_server.cc
@@ -160,20 +160,6 @@ void WindowServer::DestroyTree(WindowTree* tree) {
for (auto& pair : tree_map_)
pair.second->OnWindowDestroyingTreeImpl(tree);
- // Notify the hosts, taking care to only notify each host once.
- std::set<Display*> displays_notified;
- for (auto* root : tree->roots()) {
- // WindowTree holds its roots as a const, which is right as WindowTree
- // doesn't need to modify the window. OTOH we do. We could look up the
- // window using the id to get non-const version, but instead we cast.
- Display* display =
- display_manager_->GetDisplayContaining(const_cast<ServerWindow*>(root));
- if (display && displays_notified.count(display) == 0) {
- display->OnWillDestroyTree(tree);
- displays_notified.insert(display);
- }
- }
-
window_manager_window_tree_factory_set_.DeleteFactoryAssociatedWithTree(tree);
// Remove any requests from the client that resulted in a call to the window
« no previous file with comments | « services/ui/ws/window_manager_state_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698