Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2ae8856c87fd5e7c55cb3308abb4d4b1b42e7fc8
      
https://github.com/WebKit/WebKit/commit/2ae8856c87fd5e7c55cb3308abb4d4b1b42e7fc8
  Author: Tyler Wilcock <[email protected]>
  Date:   2025-12-09 (Tue, 09 Dec 2025)

  Changed paths:
    M 
Source/WebCore/SaferCPPExpectations/UncountedLambdaCapturesCheckerExpectations
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp
    M Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h
    M Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm

  Log Message:
  -----------
  AX: 304101@main introduced the possibility of ref'ing AXIsolatedObjects in a 
non-thread-safe way
https://bugs.webkit.org/show_bug.cgi?id=303847
rdar://166150627

Reviewed by Joshua Hoffman.

304101@main added refs to AXIsolatedObjects in functions that are not 
necessarily guaranteed to be on the accessibility
thread, introducing the possibilty of thread-safety violations.

Fix this by introducing a new class: AXIsolatedObject::MainThreadContext. This 
class contains the (thread-safe) context
necessary to hydrate an AccessibilityObject on the main-thread. Then we use 
this class whenever calling out to the
main-thread to perform an action (e.g. retrieveValueFromMainThread, 
peformFunctionOnMainThreadAndWait).

* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::performDismissAction):
(WebCore::AXIsolatedObject::setValue):
(WebCore::AXIsolatedObject::selectedText const):
(WebCore::AXIsolatedObject::accessibilityHitTest const):
(WebCore::AXIsolatedObject::getOrRetrievePropertyValue):
(WebCore::AXIsolatedObject::findTextRanges const):
(WebCore::AXIsolatedObject::performTextOperation):
(WebCore::AXIsolatedObject::elementRect const):
(WebCore::AXIsolatedObject::relativeFrame const):
(WebCore::AXIsolatedObject::convertFrameToSpace const):
(WebCore::AXIsolatedObject::replaceTextInRange):
(WebCore::AXIsolatedObject::insertionPointLineNumber const):
(WebCore::AXIsolatedObject::identifierAttribute const):
(WebCore::AXIsolatedObject::doAXRangeForLine const):
(WebCore::AXIsolatedObject::doAXStringForRange const):
(WebCore::AXIsolatedObject::characterRangeForPoint const):
(WebCore::AXIsolatedObject::doAXRangeForIndex const):
(WebCore::AXIsolatedObject::doAXStyleRangeForIndex const):
(WebCore::AXIsolatedObject::doAXBoundsForRange const):
(WebCore::AXIsolatedObject::doAXBoundsForRangeUsingCharacterOffset const):
(WebCore::AXIsolatedObject::doAXLineForIndex):
(WebCore::AXIsolatedObject::modelElementChildren):
(WebCore::AXIsolatedObject::isOnScreen const):
(WebCore::AXIsolatedObject::misspellingRanges const):
(WebCore::AXIsolatedObject::hasSameFont):
(WebCore::AXIsolatedObject::hasSameFontColor):
(WebCore::AXIsolatedObject::hasSameStyle):
(WebCore::AXIsolatedObject::linkRelValue const):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.h:
* Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
(WebCore::AXIsolatedObject::convertRectToPlatformSpace const):
(WebCore::AXIsolatedObject::textMarkerRange const):
(WebCore::AXIsolatedObject::textMarkerRangeForNSRange const):
(WebCore::AXIsolatedObject::attributedStringForTextMarkerRange const):
(WebCore::AXIsolatedObject::clickPoint):
(WebCore::AXIsolatedObject::pressedIsPresent const):
(WebCore::AXIsolatedObject::determineDropEffects const):
(WebCore::AXIsolatedObject::layoutCount const):
(WebCore::AXIsolatedObject::classList const):
(WebCore::AXIsolatedObject::computedRoleString const):

Canonical link: https://commits.webkit.org/304201@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to