Title: [286590] trunk/Source/WebKit
Revision
286590
Author
pvol...@apple.com
Date
2021-12-06 23:30:07 -0800 (Mon, 06 Dec 2021)

Log Message

[iOS] Remove mach service extensions for the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=232952
<rdar://problem/85259753>

Reviewed by Brent Fulgham.

Remove mach service extensions for the WebContent process, which we think are no longer needed, based on local testing.

* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::nonBrowserServices): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::attachmentElementServices):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (286589 => 286590)


--- trunk/Source/WebKit/ChangeLog	2021-12-07 07:19:06 UTC (rev 286589)
+++ trunk/Source/WebKit/ChangeLog	2021-12-07 07:30:07 UTC (rev 286590)
@@ -1,3 +1,26 @@
+2021-12-06  Per Arne  <pvol...@apple.com>
+
+        [iOS] Remove mach service extensions for the WebContent process
+        https://bugs.webkit.org/show_bug.cgi?id=232952
+        <rdar://problem/85259753>
+
+        Reviewed by Brent Fulgham.
+
+        Remove mach service extensions for the WebContent process, which we think are no longer needed, based on local testing.
+
+        * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
+        * Shared/WebProcessCreationParameters.cpp:
+        (WebKit::WebProcessCreationParameters::encode const):
+        (WebKit::WebProcessCreationParameters::decode):
+        * Shared/WebProcessCreationParameters.h:
+        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+        (WebKit::WebProcessPool::platformInitializeWebProcess):
+        (WebKit::nonBrowserServices): Deleted.
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::attachmentElementServices):
+        * WebProcess/cocoa/WebProcessCocoa.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess):
+
 2021-12-06  Patrick Angle  <pan...@apple.com>
 
         [Cocoa] Web Inspector: Unify Grid overlay drawing code

Modified: trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in (286589 => 286590)


--- trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in	2021-12-07 07:19:06 UTC (rev 286589)
+++ trunk/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in	2021-12-07 07:30:07 UTC (rev 286590)
@@ -1123,10 +1123,7 @@
     (require-all
         (extension "com.apple.webkit.extension.mach")
         (global-name
-            "com.apple.PowerManagement.control"
-            "com.apple.frontboard.systemappservices"
             "com.apple.iconservices"
-            "com.apple.lsd.open"
         )
     )
 )

Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp (286589 => 286590)


--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp	2021-12-07 07:19:06 UTC (rev 286589)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp	2021-12-07 07:30:07 UTC (rev 286590)
@@ -171,7 +171,6 @@
 #endif
 
 #if PLATFORM(IOS_FAMILY)
-    encoder << dynamicMachExtensionHandles;
     encoder << dynamicIOKitExtensionHandles;
 #endif
 
@@ -485,12 +484,6 @@
 #endif
 
 #if PLATFORM(IOS_FAMILY)
-    std::optional<Vector<SandboxExtension::Handle>> dynamicMachExtensionHandles;
-    decoder >> dynamicMachExtensionHandles;
-    if (!dynamicMachExtensionHandles)
-        return false;
-    parameters.dynamicMachExtensionHandles = WTFMove(*dynamicMachExtensionHandles);
-
     std::optional<Vector<SandboxExtension::Handle>> dynamicIOKitExtensionHandles;
     decoder >> dynamicIOKitExtensionHandles;
     if (!dynamicIOKitExtensionHandles)

Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.h (286589 => 286590)


--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.h	2021-12-07 07:19:06 UTC (rev 286589)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.h	2021-12-07 07:30:07 UTC (rev 286590)
@@ -209,7 +209,6 @@
 #endif
 
 #if PLATFORM(IOS_FAMILY)
-    Vector<SandboxExtension::Handle> dynamicMachExtensionHandles;
     Vector<SandboxExtension::Handle> dynamicIOKitExtensionHandles;
 #endif
 

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (286589 => 286590)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2021-12-07 07:19:06 UTC (rev 286589)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2021-12-07 07:30:07 UTC (rev 286590)
@@ -282,20 +282,6 @@
 #endif
 }
 
-#if PLATFORM(IOS_FAMILY)
-static const Vector<ASCIILiteral>& nonBrowserServices()
-{
-    ASSERT(isMainRunLoop());
-    static const auto services = makeNeverDestroyed(Vector<ASCIILiteral> {
-        "com.apple.lsd.open"_s,
-        "com.apple.iconservices"_s,
-        "com.apple.PowerManagement.control"_s,
-        "com.apple.frontboard.systemappservices"_s
-    });
-    return services;
-}
-#endif
-
 static bool requiresContainerManagerAccess()
 {
 #if PLATFORM(MAC)
@@ -425,9 +411,6 @@
 #endif
 
 #if PLATFORM(IOS_FAMILY)
-    if (!WebCore::IOSApplication::isMobileSafari())
-        parameters.dynamicMachExtensionHandles = SandboxExtension::createHandlesForMachLookup(nonBrowserServices(), std::nullopt);
-
     if (WebCore::deviceHasAGXCompilerService())
         parameters.dynamicIOKitExtensionHandles = SandboxExtension::createHandlesForIOKitClassExtensions(WebCore::agxCompilerClasses(), std::nullopt);
 #endif

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (286589 => 286590)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-12-07 07:19:06 UTC (rev 286589)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-12-07 07:30:07 UTC (rev 286590)
@@ -8015,9 +8015,6 @@
 static const Vector<ASCIILiteral>& attachmentElementServices()
 {
     static const auto services = makeNeverDestroyed(Vector<ASCIILiteral> {
-#if PLATFORM(IOS_FAMILY)
-        "com.apple.frontboard.systemappservices"_s,
-#endif
         "com.apple.iconservices"_s,
 #if PLATFORM(MAC)
         "com.apple.iconservices.store"_s,

Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (286589 => 286590)


--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2021-12-07 07:19:06 UTC (rev 286589)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2021-12-07 07:30:07 UTC (rev 286590)
@@ -413,7 +413,6 @@
         SandboxExtension::consumePermanently(*parameters.containerManagerExtensionHandle);
     
 #if PLATFORM(IOS_FAMILY)
-    SandboxExtension::consumePermanently(parameters.dynamicMachExtensionHandles);
     SandboxExtension::consumePermanently(parameters.dynamicIOKitExtensionHandles);
 #endif
     
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to