Safari 9.0: No public mechanism to associate a XPC Service process to URL

Originator:craig.hockenberry
Number:rdar://23468531 Date Originated:09-Nov-2015 01:20 PM
Status:Open Resolved:
Product:Safari Product Version:Safari 9.0 (11601.1.56)
Classification:UI/Usability Reproducible:Always
 
The Activity Monitor can display the host for a URL being handled by an instance of a WebContent process.

(an instance of /System/Library/Frameworks/WebKit.framework/Versions/A/XPCServices/com.apple.WebKit.WebContent.xpc/Contents/MacOS/com.apple.WebKit.WebContent)

For example, right now I can see that PID 35209 is using 0.1% CPU at “http://furbo.org”

There is, however, no public way to retrieve this same information. And the information can’t be retrieved from Activity Monitor because it doesn’t support AppleScript.

Notes:

This information would be useful to app and web developers who are often faced with WebKit processes that get out of hand. Scripts and other automated techniques can be used to put things back in order. When everything is “com.apple.WebKit.WebContent”, it’s much harder to do that.

Even though it couldn’t be updated after launch, a putenv(“URL=example.org”) before launching a child process would be better than what we have now.

Extra points if the solution could be something other multi-process browsers (like Chrome) could implement.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!