Check for null return from AXIsolatedTree::nodeForID.
authorandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Feb 2020 01:21:45 +0000 (01:21 +0000)
committerandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Feb 2020 01:21:45 +0000 (01:21 +0000)
commit3a8fc46a3f4edb040968aa9fed450e8fa67421ef
tree77e866522d3672388a10e4417fc738437e84fc43
parent7f62c968c90b8e1de053f4596088e4468b65bfe3
Check for null return from AXIsolatedTree::nodeForID.
https://bugs.webkit.org/show_bug.cgi?id=207300

Reviewed by Chris Fleizach.

- As the IsolatedTree is updated, AXIsolatedTree::nodeForID may return
nullptr for objects that have been removed from the tree. Thus,
IsolatedObjects must check the returned value when updating children
and any other operations involving cached IDs.
- Tidying up use of auto on for and if statements.

* accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::detachRemoteParts):
(WebCore::AXIsolatedObject::children):
(WebCore::AXIsolatedObject::accessibilityText const):
(WebCore::AXIsolatedObject::insertMathPairs):
(WebCore::AXIsolatedObject::objectAttributeValue const):
(WebCore::AXIsolatedObject::fillChildrenVectorForProperty const):
(WebCore::AXIsolatedObject::tree const): Deleted, moved inline to the header.
* accessibility/isolatedtree/AXIsolatedObject.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@255884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h