[webkit-changes] [WebKit/WebKit] fcc36e: AX: Backing object can be destroyed in _accessibil...

Joshua Hoffman noreply at github.com
Mon Feb 12 11:57:33 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fcc36e12e4cb6230daa40e08a9930ac98accbf5c
      https://github.com/WebKit/WebKit/commit/fcc36e12e4cb6230daa40e08a9930ac98accbf5c
  Author: Joshua Hoffman <jhoffman23 at apple.com>
  Date:   2024-02-12 (Mon, 12 Feb 2024)

  Changed paths:
    A LayoutTests/accessibility/ios-simulator/destroy-on-press-expected.txt
    A LayoutTests/accessibility/ios-simulator/destroy-on-press.html
    M Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm

  Log Message:
  -----------
  AX: Backing object can be destroyed in _accessibilityActivate
https://bugs.webkit.org/show_bug.cgi?id=268997
rdar://122491194

Reviewed by Chris Fleizach.

Calling AccessibilityObject::press() on the backing object is non-trivial, and could cause
the object to be destroyed, resulting a null dereference in _accessibilityActivate when
calling `isStaticText`. This patch protects that backing object with a RefPtr.

* LayoutTests/accessibility/ios-simulator/destroy-on-press-expected.txt: Added.
* LayoutTests/accessibility/ios-simulator/destroy-on-press.html: Added.
* Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityActivate]):

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




More information about the webkit-changes mailing list