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

Unified Diff: ui/accessibility/ax_tree.cc

Issue 2346473002: Revert of Add fuzzer for AXTree and fix a couple of bugs it found. (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 | « ui/accessibility/BUILD.gn ('k') | ui/accessibility/ax_tree_fuzzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accessibility/ax_tree.cc
diff --git a/ui/accessibility/ax_tree.cc b/ui/accessibility/ax_tree.cc
index 0e87a7bb65d5483e8e70849610942a6413aa62b9..58f590be22dc0eb90d1601bc85631123ee5f08a4 100644
--- a/ui/accessibility/ax_tree.cc
+++ b/ui/accessibility/ax_tree.cc
@@ -243,16 +243,8 @@
// First, delete nodes that used to be children of this node but aren't
// anymore.
if (!DeleteOldChildren(node, src.child_ids, update_state)) {
- if (update_state->new_root) {
- DestroySubtree(root_, update_state);
-
- if (node != root_ &&
- update_state->new_nodes.find(node) != update_state->new_nodes.end()) {
- DestroySubtree(node, update_state);
- }
-
- root_ = nullptr;
- }
+ if (update_state->new_root)
+ DestroySubtree(update_state->new_root, update_state);
return false;
}
@@ -269,7 +261,7 @@
// DestroySubtree.
AXNode* old_root = root_;
root_ = node;
- if (old_root && old_root != node)
+ if (old_root)
DestroySubtree(old_root, update_state);
}
« no previous file with comments | « ui/accessibility/BUILD.gn ('k') | ui/accessibility/ax_tree_fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698