Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 391aa4f2b4d206e9bbf8477c7d51a46947e4a531
      
https://github.com/WebKit/WebKit/commit/391aa4f2b4d206e9bbf8477c7d51a46947e4a531
  Author: Luming Yin <[email protected]>
  Date:   2023-05-15 (Mon, 15 May 2023)

  Changed paths:
    M Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm

  Log Message:
  -----------
  Use more accurate information for presentingApplicationBundleIdentifier
https://bugs.webkit.org/show_bug.cgi?id=256547
rdar://106709153

Reviewed by Chris Dumez.

On macOS, when the main executable of an app bundle is a shebang shell script
that points to another app, trying to obtain the canonical bundle identity via
-[NSBundle mainBundle] provides an incorrect value. This can result in incorrect
attribution for apps in MediaRemote, which drives the Now Playing module in
Control Center.

As a part of bug 243481, to ensure we pass the correct information to 
MediaRemote
on iOS, we have already introduced a mechanism to provide a presenting 
application
bundle identifier as the override identity. Clients can pass an override audit
token to set this value.

On macOS, if an override audit token isn't already provided by the client, use
NSRunningApplication to determine the presenting application bundle identifier.

See radar for more detail.

* Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
Use NSRunningApplication to determine the presenting application bundle 
identifier.

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to