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

Unified Diff: ui/accessibility/ax_tree.cc

Issue 2929673002: Add null check when reporting changed nodes to an AX tree. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | no next file » | 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 b2c0833204d2c7a415cda0442a467b8406b3a531..807ca8f826c332db13d716720e06e651150538d1 100644
--- a/ui/accessibility/ax_tree.cc
+++ b/ui/accessibility/ax_tree.cc
@@ -220,6 +220,9 @@ bool AXTree::Unserialize(const AXTreeUpdate& update) {
changes.reserve(update.nodes.size());
for (size_t i = 0; i < update.nodes.size(); ++i) {
AXNode* node = GetFromId(update.nodes[i].id);
+ if (!node)
David Tseng 2017/06/07 23:24:24 At this point, I would have expected there to be p
dmazzoni 2017/06/19 17:12:24 Imagine that B's parent is A, but B is invisible s
+ continue;
+
bool is_new_node = new_nodes.find(node) != new_nodes.end();
bool is_reparented_node =
is_new_node && update_state.HasRemovedNode(node);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698