Title: [271897] trunk/Source/WebKit
- Revision
- 271897
- Author
- pvol...@apple.com
- Date
- 2021-01-26 13:03:43 -0800 (Tue, 26 Jan 2021)
Log Message
[macOS] Close all XPC connections to Launch Services after checking in
https://bugs.webkit.org/show_bug.cgi?id=220952
<rdar://13785139>
Reviewed by Brent Fulgham.
After checking in with Launch Services on macOS, close all open XPC connections to the service.
This patch also adds checks for a valid Network process connection when updating the WebContent
process' information.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::updateProcessName):
(WebKit::WebProcess::updateActivePages):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (271896 => 271897)
--- trunk/Source/WebKit/ChangeLog 2021-01-26 20:44:04 UTC (rev 271896)
+++ trunk/Source/WebKit/ChangeLog 2021-01-26 21:03:43 UTC (rev 271897)
@@ -1,5 +1,22 @@
2021-01-26 Per Arne <pvol...@apple.com>
+ [macOS] Close all XPC connections to Launch Services after checking in
+ https://bugs.webkit.org/show_bug.cgi?id=220952
+ <rdar://13785139>
+
+ Reviewed by Brent Fulgham.
+
+ After checking in with Launch Services on macOS, close all open XPC connections to the service.
+ This patch also adds checks for a valid Network process connection when updating the WebContent
+ process' information.
+
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::platformInitializeWebProcess):
+ (WebKit::WebProcess::updateProcessName):
+ (WebKit::WebProcess::updateActivePages):
+
+2021-01-26 Per Arne <pvol...@apple.com>
+
[macOS] Add local sandbox reporting for access to Metal services in the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=220986
Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (271896 => 271897)
--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2021-01-26 20:44:04 UTC (rev 271896)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2021-01-26 21:03:43 UTC (rev 271897)
@@ -319,7 +319,11 @@
// Update process name while holding the Launch Services sandbox extension
updateProcessName();
- // FIXME: (<rdar://problem/70345312): Notify LaunchServices that we will be disconnecting.
+#if ENABLE(SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS)
+ // FIXME: Replace the constant 4 with kLSServerConnectionStatusReleaseNotificationsMask when available in the SDK, see <https://bugs.webkit.org/show_bug.cgi?id=220988>.
+ _LSSetApplicationLaunchServicesServerConnectionStatus(kLSServerConnectionStatusDoNotConnectToServerMask | /*kLSServerConnectionStatusReleaseNotificationsMask*/ 4, nullptr);
+#endif
+
if (launchServicesExtension)
launchServicesExtension->revoke();
#endif
@@ -401,10 +405,6 @@
softLink_HIServices__AXSetAuditTokenIsAuthenticatedCallback(isAXAuthenticatedCallback);
#endif
-#if ENABLE(SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS)
- _LSSetApplicationLaunchServicesServerConnectionStatus(kLSServerConnectionStatusDoNotConnectToServerMask, nullptr);
-#endif
-
WebCore::IOSurface::setMaximumSize(parameters.maximumIOSurfaceSize);
}
@@ -456,6 +456,10 @@
}
#if ENABLE(SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS)
+ if (!m_networkProcessConnection) {
+ WTFLogAlways("Unable to update process name since there is no Network process connection.");
+ return;
+ }
audit_token_t auditToken = { 0 };
mach_msg_type_number_t info_size = TASK_AUDIT_TOKEN_COUNT;
kern_return_t err = task_info(mach_task_self(), TASK_AUDIT_TOKEN, reinterpret_cast<integer_t *>(&auditToken), &info_size);
@@ -741,6 +745,10 @@
{
#if PLATFORM(MAC)
#if ENABLE(SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS)
+ if (!m_networkProcessConnection) {
+ WTFLogAlways("Unable to update active pages since there is no Network process connection.");
+ return;
+ }
audit_token_t auditToken = { 0 };
mach_msg_type_number_t info_size = TASK_AUDIT_TOKEN_COUNT;
kern_return_t err = task_info(mach_task_self(), TASK_AUDIT_TOKEN, reinterpret_cast<integer_t *>(&auditToken), &info_size);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes