[webkit-changes] [WebKit/WebKit] 701c7a: REGRESSION (288022 at main): Crash when right clickin...

Aditya Keerthi noreply at github.com
Sun Feb 23 23:37:10 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 701c7a5bb2099115e8fcb52bc85e9bb125a90fd5
      https://github.com/WebKit/WebKit/commit/701c7a5bb2099115e8fcb52bc85e9bb125a90fd5
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2025-02-23 (Sun, 23 Feb 2025)

  Changed paths:
    M Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm

  Log Message:
  -----------
  REGRESSION (288022 at main): Crash when right clicking over text in the base system
https://bugs.webkit.org/show_bug.cgi?id=288351
rdar://145245336

Reviewed by Richard Robinson and Abrar Rahman Protyasha.

`-[NSSharingServicePicker standardShareMenuItem]` can return `nil` in the base
system, as ShareKit.framework is not available there. The AppKit implementation
is effectively a wrapper around ShareKit.

Prior to 288022 at main, this was not an issue, since the `nil` menu item was
returned directly. However, after 288022 at main, the title is read off of the
menu item in order to create a new one. Reading the title off of a `nil` item
returns `nil`, and consequently, an attempt to create an `NSMenuItem` with a
`nil` title is made. This results in a release assertion getting hit in AppKit.

Fix by adding a `nil` check and restoring the original behavior.

* Source/WebKit/UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::createShareMenuItem):

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