[webkit-changes] [WebKit/WebKit] b8e7cf: AX: Update generateRemoteToken to return a vector

Joshua Hoffman noreply at github.com
Tue Dec 24 08:55:18 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b8e7cf92b349613e123e257d7fe98632f768b2cf
      https://github.com/WebKit/WebKit/commit/b8e7cf92b349613e123e257d7fe98632f768b2cf
  Author: Joshua Hoffman <jhoffman23 at apple.com>
  Date:   2024-12-24 (Tue, 24 Dec 2024)

  Changed paths:
    M Source/WebCore/accessibility/AXRemoteFrame.h
    M Source/WebCore/accessibility/AccessibilityObject.h
    M Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm
    M Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm
    M Source/WebKit/UIProcess/ios/WKContentView.mm

  Log Message:
  -----------
  AX: Update generateRemoteToken to return a vector
https://bugs.webkit.org/show_bug.cgi?id=285118
rdar://problem/141965781

Reviewed by Wenson Hsieh.

We need the lifetime of the token generated from `generateRemoteToken` to persist while
we are passing it around, to avoid a UAF. To make this safer, let's make
`newAccessibilityRemoteToken` return a `RetainPtr<NSData>` and `generateRemoteToken`
return a `Vector`, rather than an intermediate `span`.

* Source/WebCore/accessibility/AXRemoteFrame.h:
* Source/WebCore/accessibility/AccessibilityObject.h:
* Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm:
(WebCore::AXRemoteFrame::generateRemoteToken const):
(WebCore::Accessibility::newAccessibilityRemoteToken):
* Source/WebCore/accessibility/mac/AccessibilityObjectMac.mm:
(WebCore::AXRemoteFrame::generateRemoteToken const):
* Source/WebKit/UIProcess/ios/WKContentView.mm:
(-[WKContentView _accessibilityRegisterUIProcessTokens]):

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



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


More information about the webkit-changes mailing list