Skip to content

Commit

Permalink
[macOS] Show more accurate names for child processes in Activity Monitor
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=256174
rdar://102152759

Reviewed by Per Arne Vollan and Tim Horton.

See radar for more information.

* Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
(WebKit::ProcessLauncher::launchProcess):

Canonical link: https://commits.webkit.org/263588@main
  • Loading branch information
cdumez committed May 2, 2023
1 parent 9aeb8b6 commit 7dd1864
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -179,7 +179,11 @@
xpc_dictionary_set_string(bootstrapMessage.get(), "client-identifier", !clientIdentifier.isEmpty() ? clientIdentifier.utf8().data() : *_NSGetProgname());
xpc_dictionary_set_string(bootstrapMessage.get(), "client-bundle-identifier", WebCore::applicationBundleIdentifier().utf8().data());
xpc_dictionary_set_string(bootstrapMessage.get(), "process-identifier", String::number(m_launchOptions.processIdentifier.toUInt64()).utf8().data());
#if PLATFORM(MAC)
xpc_dictionary_set_string(bootstrapMessage.get(), "ui-process-name", [[[NSRunningApplication currentApplication] localizedName] UTF8String]);
#else
xpc_dictionary_set_string(bootstrapMessage.get(), "ui-process-name", [[[NSProcessInfo processInfo] processName] UTF8String]);
#endif
xpc_dictionary_set_string(bootstrapMessage.get(), "service-name", name);

if (m_launchOptions.processType == ProcessLauncher::ProcessType::Web) {
Expand Down

0 comments on commit 7dd1864

Please sign in to comment.