AX: Crash in accessing AXObjectCache in textMarkerDataForVisiblePosition
authorcfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jul 2018 21:56:02 +0000 (21:56 +0000)
committercfleizach@apple.com <cfleizach@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jul 2018 21:56:02 +0000 (21:56 +0000)
commitdf8bf48c1cc5793c4f38e27e68576a6ef121c8fc
treeec4996bfe54a8d15ff05e5929057f54a29c7ecac
parent1f98aab90bc01a7dc92f3c6c131cfda839b1fc19
AX: Crash in accessing AXObjectCache in textMarkerDataForVisiblePosition
https://bugs.webkit.org/show_bug.cgi?id=187528
<rdar://problem/37231941>

Reviewed by Joanmarie Diggs.

Occasional crashes reported when running accessibility/mac/search-field-cancel-button.html.
Looks like the cache object retrieved was not valid and we weren't checking for it.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::visiblePositionForTextMarkerData):
(WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
(WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):

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