[webkit-changes] [WebKit/WebKit] d3cf48: REGRESSION (263588 at main): AirID Central is broken ...

Wenson Hsieh noreply at github.com
Tue Oct 17 22:28:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d3cf48f414d442172b19ecaca8f0ecc3d8c7050c
      https://github.com/WebKit/WebKit/commit/d3cf48f414d442172b19ecaca8f0ecc3d8c7050c
  Author: Wenson Hsieh <wenson_hsieh at apple.com>
  Date:   2023-10-17 (Tue, 17 Oct 2023)

  Changed paths:
    M Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm
    M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
    A Tools/TestWebKitAPI/Tests/mac/LoadWebViewWithEmptyAppName.mm

  Log Message:
  -----------
  REGRESSION (263588 at main): AirID Central is broken on macOS Sonoma
https://bugs.webkit.org/show_bug.cgi?id=263301
rdar://116431916

Reviewed by Tim Horton.

Make UI process name propagation to WebKit child XPC services robust, in the case where
`-[NSRunningApplication localizedName]` is the empty string. Currently, this results in the UI
process sending an empty (albeit non-null) string representing the UI process name through XPC
boostrap arguments. However, this causes child processes to terminate immediately upon launch, since
the logic to deserialize the app name in `XPCServiceInitializerDelegate` is more strict (and checks
whether the name is empty, rather than just null).

To fix this, simply fall back to the raw process name in the case where the localized app name is
empty (or null).

Test: WebKit2.LoadWithEmptyAppName

* Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
(WebKit::ProcessLauncher::finishLaunchingProcess):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/mac/LoadWebViewWithEmptyAppName.mm: Added.
(swizzledAppName):

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




More information about the webkit-changes mailing list