Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remote Web Inspector: Send the
presentingApplicationPID
to the rela…
…y process for WKWebViews https://bugs.webkit.org/show_bug.cgi?id=254537 rdar://105636143 Reviewed by BJ Burg. In some cases, a process may create WKWebViews on behalf of another process to be served remotely. WKWebViews inspectability is managed in the UI process, and those does not currently use the `presentingApplicationPID` to associate a target with a specific parent process (a process may represent multiple parent processes at a time). We thus need to provide target-specific PIDs for the presenting application so that WKWebViews are correctly related back to the application that is showing the web content via the intermediate remote service that actually created the WKWebView. * Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.cpp: (Inspector::RemoteInspectionTarget::setPresentingApplicationPID): * Source/JavaScriptCore/inspector/remote/RemoteInspectionTarget.h: - Allow setting a per-target `presentingApplicationPID` as an alternative to having a single PID the entire process proxies its inspectable content to. * Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm: (Inspector::identifierForPID): (Inspector::RemoteInspector::listingForInspectionTarget const): - Provide a per-target presenting application PID so that individual web views can be associated the appropriate process. Relays should use this value in place of the application-wide parent process PID when it is present. For WKWebView, those values will be equal by default unless explicitly set. (Inspector::RemoteInspector::receivedProxyApplicationSetupMessage): - Proxy apps don't need to respond to the proxy setup message, since all the necessary information will be provided with the application's listing of targets. * Source/WebKit/UIProcess/WebPageProxy.cpp: - Use the `presentingApplicationPID` of the web content process pool to inform associate the inspectable page with the correct parent application, since that is the pool that the content to be inspected will actually exist in. Unless it has been overriden, this will be the PID of the UI process. Canonical link: https://commits.webkit.org/262620@main
- Loading branch information
1 parent
de96a0b
commit d5d5bd3
Showing
5 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters