Title: [265472] branches/safari-610.1.25.10-branch/Source/WebKit
Revision
265472
Author
[email protected]
Date
2020-08-10 16:48:03 -0700 (Mon, 10 Aug 2020)

Log Message

Cherry-pick r265295. rdar://problem/66643989

    [Cocoa] Remove obsolete sandbox extension after r264178
    https://bugs.webkit.org/show_bug.cgi?id=215154

    Reviewed by Brent Fulgham.

    After r264178, the code related to issuing an extension to com.apple.lsd.mapdb is obsolete, and should be removed.

    No new tests, covered by existing tests.

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

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265295 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-610.1.25.10-branch/Source/WebKit/ChangeLog (265471 => 265472)


--- branches/safari-610.1.25.10-branch/Source/WebKit/ChangeLog	2020-08-10 23:48:00 UTC (rev 265471)
+++ branches/safari-610.1.25.10-branch/Source/WebKit/ChangeLog	2020-08-10 23:48:03 UTC (rev 265472)
@@ -1,5 +1,54 @@
 2020-08-10  Alan Coon  <[email protected]>
 
+        Cherry-pick r265295. rdar://problem/66643989
+
+    [Cocoa] Remove obsolete sandbox extension after r264178
+    https://bugs.webkit.org/show_bug.cgi?id=215154
+    
+    Reviewed by Brent Fulgham.
+    
+    After r264178, the code related to issuing an extension to com.apple.lsd.mapdb is obsolete, and should be removed.
+    
+    No new tests, covered by existing tests.
+    
+    * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+    * Shared/WebProcessCreationParameters.cpp:
+    (WebKit::WebProcessCreationParameters::encode const):
+    (WebKit::WebProcessCreationParameters::decode):
+    * Shared/WebProcessCreationParameters.h:
+    * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+    (WebKit::WebProcessPool::platformInitializeWebProcess):
+    * WebProcess/cocoa/WebProcessCocoa.mm:
+    (WebKit::WebProcess::platformInitializeWebProcess):
+    * WebProcess/com.apple.WebProcess.sb.in:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-08-05  Per Arne Vollan  <[email protected]>
+
+            [Cocoa] Remove obsolete sandbox extension after r264178
+            https://bugs.webkit.org/show_bug.cgi?id=215154
+
+            Reviewed by Brent Fulgham.
+
+            After r264178, the code related to issuing an extension to com.apple.lsd.mapdb is obsolete, and should be removed.
+
+            No new tests, covered by existing tests.
+
+            * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+            * Shared/WebProcessCreationParameters.cpp:
+            (WebKit::WebProcessCreationParameters::encode const):
+            (WebKit::WebProcessCreationParameters::decode):
+            * Shared/WebProcessCreationParameters.h:
+            * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+            (WebKit::WebProcessPool::platformInitializeWebProcess):
+            * WebProcess/cocoa/WebProcessCocoa.mm:
+            (WebKit::WebProcess::platformInitializeWebProcess):
+            * WebProcess/com.apple.WebProcess.sb.in:
+
+2020-08-10  Alan Coon  <[email protected]>
+
         Cherry-pick r265264. rdar://problem/66644041
 
     [iOS] Check that Accessibility is enabled when receiving the enable Accessibility notification

Modified: branches/safari-610.1.25.10-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (265471 => 265472)


--- branches/safari-610.1.25.10-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-08-10 23:48:00 UTC (rev 265471)
+++ branches/safari-610.1.25.10-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-08-10 23:48:03 UTC (rev 265472)
@@ -960,7 +960,6 @@
             "com.apple.containermanagerd"
             "com.apple.diagnosticd"
             "com.apple.iphone.axserver-systemwide"
-            "com.apple.lsd.mapdb"
             "com.apple.mobileassetd.v2"
             "com.apple.mobilegestalt.xpc"
             "com.apple.nehelper"

Modified: branches/safari-610.1.25.10-branch/Source/WebKit/Shared/WebProcessCreationParameters.cpp (265471 => 265472)


--- branches/safari-610.1.25.10-branch/Source/WebKit/Shared/WebProcessCreationParameters.cpp	2020-08-10 23:48:00 UTC (rev 265471)
+++ branches/safari-610.1.25.10-branch/Source/WebKit/Shared/WebProcessCreationParameters.cpp	2020-08-10 23:48:03 UTC (rev 265472)
@@ -169,7 +169,6 @@
 #endif
 
 #if PLATFORM(COCOA)
-    encoder << mapDBExtensionHandle;
     encoder << systemHasBattery;
     encoder << systemHasAC;
 #endif
@@ -456,12 +455,6 @@
 #endif
 
 #if PLATFORM(COCOA)
-    Optional<Optional<SandboxExtension::Handle>> mapDBExtensionHandle;
-    decoder >> mapDBExtensionHandle;
-    if (!mapDBExtensionHandle)
-        return false;
-    parameters.mapDBExtensionHandle = WTFMove(*mapDBExtensionHandle);
-
     Optional<bool> systemHasBattery;
     decoder >> systemHasBattery;
     if (!systemHasBattery)

Modified: branches/safari-610.1.25.10-branch/Source/WebKit/Shared/WebProcessCreationParameters.h (265471 => 265472)


--- branches/safari-610.1.25.10-branch/Source/WebKit/Shared/WebProcessCreationParameters.h	2020-08-10 23:48:00 UTC (rev 265471)
+++ branches/safari-610.1.25.10-branch/Source/WebKit/Shared/WebProcessCreationParameters.h	2020-08-10 23:48:03 UTC (rev 265472)
@@ -213,7 +213,6 @@
 #endif
 
 #if PLATFORM(COCOA)
-    Optional<SandboxExtension::Handle> mapDBExtensionHandle;
     bool systemHasBattery { false };
     bool systemHasAC { false };
 #endif

Modified: branches/safari-610.1.25.10-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (265471 => 265472)


--- branches/safari-610.1.25.10-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-08-10 23:48:00 UTC (rev 265471)
+++ branches/safari-610.1.25.10-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-08-10 23:48:03 UTC (rev 265472)
@@ -418,10 +418,6 @@
 #if PLATFORM(COCOA)
     parameters.systemHasBattery = systemHasBattery();
     parameters.systemHasAC = cachedSystemHasAC().valueOr(true);
-
-    SandboxExtension::Handle mapDBHandle;
-    if (SandboxExtension::createHandleForMachLookup("com.apple.lsd.mapdb"_s, WTF::nullopt, mapDBHandle, SandboxExtension::Flags::NoReport))
-        parameters.mapDBExtensionHandle = WTFMove(mapDBHandle);
 #endif
 
     if (requiresContainerManagerAccess()) {

Modified: branches/safari-610.1.25.10-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (265471 => 265472)


--- branches/safari-610.1.25.10-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-08-10 23:48:00 UTC (rev 265471)
+++ branches/safari-610.1.25.10-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2020-08-10 23:48:03 UTC (rev 265472)
@@ -231,24 +231,6 @@
         }
     }
 
-#if HAVE(LSDATABASECONTEXT)
-    // FIXME: Remove this entire section when the selector observeDatabaseChange4WebKit is present
-    auto context = [NSClassFromString(@"LSDatabaseContext") sharedDatabaseContext];
-    if (![context respondsToSelector:@selector(observeDatabaseChange4WebKit:)]) {
-        // Map Launch Services database. This should be done as early as possible, as the mapping will fail
-        // if 'com.apple.lsd.mapdb' is being accessed before this.
-        if (parameters.mapDBExtensionHandle) {
-            auto extension = SandboxExtension::create(WTFMove(*parameters.mapDBExtensionHandle));
-            bool ok = extension->consume();
-            ASSERT_UNUSED(ok, ok);
-            // Perform API calls which will communicate with the database mapping service, and map the database.
-            auto uti = adoptCF(UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, CFSTR("text/html"), 0));
-            ok = extension->revoke();
-            ASSERT_UNUSED(ok, ok);
-            ASSERT(String(uti.get()) == String(adoptCF(UTTypeCreatePreferredIdentifierForTag(kUTTagClassMIMEType, CFSTR("text/html"), 0)).get()));
-        }
-    }
-#endif
 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
     WebCore::initializeLogChannelsIfNecessary(parameters.webCoreLoggingChannels);
     WebKit::initializeLogChannelsIfNecessary(parameters.webKitLoggingChannels);

Modified: branches/safari-610.1.25.10-branch/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in (265471 => 265472)


--- branches/safari-610.1.25.10-branch/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2020-08-10 23:48:00 UTC (rev 265471)
+++ branches/safari-610.1.25.10-branch/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2020-08-10 23:48:03 UTC (rev 265472)
@@ -973,7 +973,6 @@
             "com.apple.cfprefsd.daemon"
             "com.apple.containermanagerd"
             "com.apple.tccd"
-            "com.apple.lsd.mapdb"
             "com.apple.BluetoothServices"
 
             ;;; FIXME(207716): The following should be removed when the GPU process is complete
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to