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

Unified Diff: mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc

Issue 315863002: Fix destruction tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
Index: mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc b/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
index 77a9ce205e08ea2f558f2cd43d9e6a2ccc18e71e..62cab23569ea3d8d65690f48b6c3ea4a02f6c45d 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
@@ -604,8 +604,11 @@ void ViewManagerSynchronizer::OnNodeDeleted(uint32_t node_id,
next_server_change_id_ = server_change_id + 1;
ViewTreeNode* node = view_manager()->GetNodeById(node_id);
- if (node)
+ if (node) {
+ if (view_manager()->tree() == node)
+ ViewManagerPrivate(view_manager()).set_root(NULL);
ViewTreeNodePrivate(node).LocalDestroy();
+ }
}
void ViewManagerSynchronizer::OnNodeViewReplaced(uint32_t node_id,
« no previous file with comments | « mojo/service_manager/service_manager.cc ('k') | mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698