WKAccessibilityWebPageObject should use Accessibility::retrieveValueFromMainThread.
authorandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jan 2020 21:39:42 +0000 (21:39 +0000)
committerandresg_22@apple.com <andresg_22@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Jan 2020 21:39:42 +0000 (21:39 +0000)
commit7d12f03635b9d1bac14807dec5c1b5fae8cbc4a7
tree78254a9fdd6c6f7a95e4f9aa6fcf3c695ece171c
parente2089a27906bb76def868f6d9b94b067fe8dac40
WKAccessibilityWebPageObject should use Accessibility::retrieveValueFromMainThread.
https://bugs.webkit.org/show_bug.cgi?id=206009

Reviewed by Chris Fleizach.

- WKAccessibilityWebPageObject now uses Accessibility::retrieveValueFromMainThread,
which is consistent with WebAccessibilityObjectWrapper.
- It also uses a captured protectedSelf to ensure the object is alive
when the lambda is invoked on the main thread.
- Added nullity check for m_page in accessibilityAttributeSizeValue,
which is a potential crasher in the multithreaded mode.

* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject ALLOW_DEPRECATED_IMPLEMENTATIONS_END]):
(-[WKAccessibilityWebPageObject convertScreenPointToRootView:]):
(-[WKAccessibilityWebPageObject accessibilityAttributeSizeValue]):
(-[WKAccessibilityWebPageObject accessibilityAttributePositionValue]):
(-[WKAccessibilityWebPageObject accessibilityDataDetectorValue:point:]):
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
(retrieveAccessibilityValueFromMainThread): Not needed since it uses now the one in Accessibility nasespace.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@254294 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm