Avoid recalculating native role in AXNodeObject::CanHaveChildren
CanHaveChildren() is called frequently, including from delicate situations like when a LayoutObject is being deleted. Currently it calls NativeAccessibilityRoleIgnoringAria(), which is actually somewhat expensive and calls UpdateDistribution(), and clusterfuzz found a way for that to result in a UAF. The easy solution is just to save the result of NativeAccessibilityRoleIgnoringAria when we initially compute the node's role. Then CanHaveChildren() can just check it directly rather than recomputing it each time. Bug: 852735, 852251 Change-Id: Id745d3b42c1f89434e519195e8511159621734d0 Reviewed-on: https://chromium-review.googlesource.com/1175491 Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org> Reviewed-by:Alice Boxhall <aboxhall@chromium.org> Cr-Commit-Position: refs/heads/master@{#583726}
Showing
Please register or sign in to comment