Commit 078ff2f6 authored by Vladimir Levin's avatar Vladimir Levin Committed by Chromium LUCI CQ

AX: Add a null check for GetNode() in ComputeAccessibilityIsIgnored.

Since we pass this node as a reference, we need to ensure that it isn't
null.

This is a speculative fix for the referenced bug.

R=aleventhal@chromium.org
Bug: 1156599

Change-Id: I117910cd1304c61f7accea1b70fca92c75ece647
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2579943Reviewed-by: default avatarAaron Leventhal <aleventhal@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834853}
parent 317c9f06
......@@ -471,6 +471,11 @@ bool AXNodeObject::ComputeAccessibilityIsIgnored(
DCHECK(initialized_);
#endif
// If we don't have a node, then ignore the node object.
// TODO(vmpstr/aleventhal): Investigate how this can happen.
if (!GetNode())
return true;
// All nodes must have an unignored parent within their tree under
// kRootWebArea, so force kRootWebArea to always be unignored.
if (role_ == ax::mojom::blink::Role::kRootWebArea)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment