[webkit-changes] [WebKit/WebKit] b246eb: REGRESSION (281333 at main) [Cocoa] Correct nullptr c...

Brent Fulgham noreply at github.com
Thu Oct 24 15:47:01 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b246ebabcdfdd563aefff65ba6c09062b2d67f50
      https://github.com/WebKit/WebKit/commit/b246ebabcdfdd563aefff65ba6c09062b2d67f50
  Author: Brent Fulgham <bfulgham at apple.com>
  Date:   2024-10-24 (Thu, 24 Oct 2024)

  Changed paths:
    M Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp

  Log Message:
  -----------
  REGRESSION (281333 at main) [Cocoa] Correct nullptr crashes in WKAccessibilityRootObject
https://bugs.webkit.org/show_bug.cgi?id=281991
<rdar://134606621>

Reviewed by Charlie Wolfe.

The original code used WKPageRef to locate the accessibility root, and expected the
passed WKPageRef might be nullptr, and checked for that.

The new code switched to a model where the specific WKFrameRef in play was checked (to
support site isolation). The code that identifies the frame can return nullptr, but the
new WKFrameRef-based method did not check for nullptr, leading to this crash.

This patch restores that nullptr check, and makes sure that WKBundleFrame functions that
receive their frame through the new mechanism in 281333 at main also check for a possible
nullptr frame (since this is possible).

* Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameSetTextDirection):
(WKBundleFrameSetAccessibleName):
(WKBundleFrameCallShouldCloseOnWebView):
(WKBundleFrameCreateHitTestResult):
(_WKBundleFrameGenerateTestReport):
(WKAccessibilityRootObject):

Canonical link: https://commits.webkit.org/285671@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