Title: [258570] branches/safari-610.1.7-branch/Source
Revision
258570
Author
[email protected]
Date
2020-03-17 12:10:54 -0700 (Tue, 17 Mar 2020)

Log Message

Cherry-pick r258557. rdar://problem/60517387

    [Cocoa] Disable CF prefs direct mode
    https://bugs.webkit.org/show_bug.cgi?id=209166
    <rdar://problem/60517387>

    Reviewed by Brent Fulgham.

    Revert <https://trac.webkit.org/changeset/258064> by disabling the CF prefs direct mode feature,
    since it caused performance regressions.

    Source/WebKit:

    * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
    * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
    (WebKit::XPCServiceMain):
    * UIProcess/Cocoa/PreferenceObserver.mm:
    * UIProcess/Cocoa/WebPageProxyCocoa.mm:
    (WebKit::WebPageProxy::grantAccessToPreferenceService):
    * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
    * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
    * UIProcess/WebProcessPool.h:
    * UIProcess/WebProcessProxy.h:
    * WebProcess/WebProcess.h:
    * WebProcess/WebProcess.messages.in:

    Source/WTF:

    * wtf/PlatformEnable.h:

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

Modified Paths

Diff

Modified: branches/safari-610.1.7-branch/Source/WTF/ChangeLog (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WTF/ChangeLog	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WTF/ChangeLog	2020-03-17 19:10:54 UTC (rev 258570)
@@ -1,3 +1,51 @@
+2020-03-17  Alan Coon  <[email protected]>
+
+        Cherry-pick r258557. rdar://problem/60517387
+
+    [Cocoa] Disable CF prefs direct mode
+    https://bugs.webkit.org/show_bug.cgi?id=209166
+    <rdar://problem/60517387>
+    
+    Reviewed by Brent Fulgham.
+    
+    Revert <https://trac.webkit.org/changeset/258064> by disabling the CF prefs direct mode feature,
+    since it caused performance regressions.
+    
+    Source/WebKit:
+    
+    * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+    * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
+    (WebKit::XPCServiceMain):
+    * UIProcess/Cocoa/PreferenceObserver.mm:
+    * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+    (WebKit::WebPageProxy::grantAccessToPreferenceService):
+    * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+    * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
+    * UIProcess/WebProcessPool.h:
+    * UIProcess/WebProcessProxy.h:
+    * WebProcess/WebProcess.h:
+    * WebProcess/WebProcess.messages.in:
+    
+    Source/WTF:
+    
+    * wtf/PlatformEnable.h:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-03-17  Per Arne Vollan  <[email protected]>
+
+            [Cocoa] Disable CF prefs direct mode
+            https://bugs.webkit.org/show_bug.cgi?id=209166
+            <rdar://problem/60517387>
+
+            Reviewed by Brent Fulgham.
+
+            Revert <https://trac.webkit.org/changeset/258064> by disabling the CF prefs direct mode feature,
+            since it caused performance regressions.
+
+            * wtf/PlatformEnable.h:
+
 2020-03-11  Alan Coon  <[email protected]>
 
         Cherry-pick r258284. rdar://problem/60341123

Modified: branches/safari-610.1.7-branch/Source/WTF/wtf/PlatformEnable.h (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WTF/wtf/PlatformEnable.h	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WTF/wtf/PlatformEnable.h	2020-03-17 19:10:54 UTC (rev 258570)
@@ -875,4 +875,4 @@
 #error "ENABLE(WEBGL2) requires ENABLE(WEBGL)"
 #endif
 
-#define ENABLE_CFPREFS_DIRECT_MODE 1
+#define ENABLE_CFPREFS_DIRECT_MODE 0

Modified: branches/safari-610.1.7-branch/Source/WebKit/ChangeLog (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WebKit/ChangeLog	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WebKit/ChangeLog	2020-03-17 19:10:54 UTC (rev 258570)
@@ -1,5 +1,64 @@
 2020-03-17  Alan Coon  <[email protected]>
 
+        Cherry-pick r258557. rdar://problem/60517387
+
+    [Cocoa] Disable CF prefs direct mode
+    https://bugs.webkit.org/show_bug.cgi?id=209166
+    <rdar://problem/60517387>
+    
+    Reviewed by Brent Fulgham.
+    
+    Revert <https://trac.webkit.org/changeset/258064> by disabling the CF prefs direct mode feature,
+    since it caused performance regressions.
+    
+    Source/WebKit:
+    
+    * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+    * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
+    (WebKit::XPCServiceMain):
+    * UIProcess/Cocoa/PreferenceObserver.mm:
+    * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+    (WebKit::WebPageProxy::grantAccessToPreferenceService):
+    * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+    * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
+    * UIProcess/WebProcessPool.h:
+    * UIProcess/WebProcessProxy.h:
+    * WebProcess/WebProcess.h:
+    * WebProcess/WebProcess.messages.in:
+    
+    Source/WTF:
+    
+    * wtf/PlatformEnable.h:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-03-17  Per Arne Vollan  <[email protected]>
+
+            [Cocoa] Disable CF prefs direct mode
+            https://bugs.webkit.org/show_bug.cgi?id=209166
+            <rdar://problem/60517387>
+
+            Reviewed by Brent Fulgham.
+
+            Revert <https://trac.webkit.org/changeset/258064> by disabling the CF prefs direct mode feature,
+            since it caused performance regressions.
+
+            * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
+            * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
+            (WebKit::XPCServiceMain):
+            * UIProcess/Cocoa/PreferenceObserver.mm:
+            * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+            (WebKit::WebPageProxy::grantAccessToPreferenceService):
+            * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+            * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
+            * UIProcess/WebProcessPool.h:
+            * UIProcess/WebProcessProxy.h:
+            * WebProcess/WebProcess.h:
+            * WebProcess/WebProcess.messages.in:
+
+2020-03-17  Alan Coon  <[email protected]>
+
         Cherry-pick r258512. rdar://problem/60517387
 
     [Cocoa] Only set CF prefs direct mode for the WebContent process

Modified: branches/safari-610.1.7-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb	2020-03-17 19:10:54 UTC (rev 258570)
@@ -536,6 +536,7 @@
 (allow mach-lookup
     (global-name "com.apple.logd")
     (global-name "com.apple.logd.events")
+    (global-name "com.apple.cfprefsd.daemon")
 )
 
 (deny mach-lookup (with telemetry)

Modified: branches/safari-610.1.7-branch/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm	2020-03-17 19:10:54 UTC (rev 258570)
@@ -114,6 +114,9 @@
         // Enable CFPrefs direct mode to avoid unsuccessfully attempting to connect to the daemon and getting blocked by the sandbox.
         _CFPrefsSetDirectModeEnabled(YES);
     }
+#else
+    UNUSED_PARAM(argc);
+    UNUSED_PARAM(argv);
 #endif
 
     auto bootstrap = adoptOSObject(xpc_copy_bootstrap());

Modified: branches/safari-610.1.7-branch/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WebKit/UIProcess/Cocoa/PreferenceObserver.mm	2020-03-17 19:10:54 UTC (rev 258570)
@@ -216,10 +216,12 @@
 
 - (void)preferenceDidChange:(NSString *)domain key:(NSString *)key encodedValue:(NSString *)encodedValue
 {
+#if ENABLE(CFPREFS_DIRECT_MODE)
     Optional<String> encodedString;
     if (encodedValue)
         encodedString = String(encodedValue);
     for (auto* processPool : WebKit::WebProcessPool::allProcessPools())
         processPool->notifyPreferencesChanged(domain, key, encodedString);
+#endif
 }
 @end

Modified: branches/safari-610.1.7-branch/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm	2020-03-17 19:10:54 UTC (rev 258570)
@@ -352,7 +352,9 @@
 
 void WebPageProxy::grantAccessToPreferenceService()
 {
+#if ENABLE(CFPREFS_DIRECT_MODE)
     process().unblockPreferenceServiceIfNeeded();
+#endif
 }
 
 } // namespace WebKit

Modified: branches/safari-610.1.7-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm	2020-03-17 19:10:54 UTC (rev 258570)
@@ -852,10 +852,12 @@
     return m_classesForParameterCoder.get();
 }
 
+#if ENABLE(CFPREFS_DIRECT_MODE)
 void WebProcessPool::notifyPreferencesChanged(const String& domain, const String& key, const Optional<String>& encodedValue)
 {
     for (auto process : m_processes)
         process->send(Messages::WebProcess::NotifyPreferencesChanged(domain, key, encodedValue), 0);
 }
+#endif
 
 } // namespace WebKit

Modified: branches/safari-610.1.7-branch/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm	2020-03-17 19:10:54 UTC (rev 258570)
@@ -255,6 +255,7 @@
     m_hasSentMessageToUnblockAccessibilityServer = true;
 }
 
+#if ENABLE(CFPREFS_DIRECT_MODE)
 void WebProcessProxy::unblockPreferenceServiceIfNeeded()
 {
     if (m_hasSentMessageToUnblockPreferenceService)
@@ -271,5 +272,6 @@
     send(Messages::WebProcess::UnblockPreferenceService(handle), 0);
     m_hasSentMessageToUnblockPreferenceService = true;
 }
+#endif
 
 }

Modified: branches/safari-610.1.7-branch/Source/WebKit/UIProcess/WebProcessPool.h (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WebKit/UIProcess/WebProcessPool.h	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WebKit/UIProcess/WebProcessPool.h	2020-03-17 19:10:54 UTC (rev 258570)
@@ -541,7 +541,7 @@
     void setUseSeparateServiceWorkerProcess(bool);
     bool useSeparateServiceWorkerProcess() const { return m_useSeparateServiceWorkerProcess; }
 
-#if PLATFORM(COCOA)
+#if ENABLE(CFPREFS_DIRECT_MODE)
     void notifyPreferencesChanged(const String& domain, const String& key, const Optional<String>& encodedValue);
 #endif
 

Modified: branches/safari-610.1.7-branch/Source/WebKit/UIProcess/WebProcessProxy.h (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WebKit/UIProcess/WebProcessProxy.h	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WebKit/UIProcess/WebProcessProxy.h	2020-03-17 19:10:54 UTC (rev 258570)
@@ -338,8 +338,10 @@
     
 #if PLATFORM(COCOA)
     void unblockAccessibilityServerIfNeeded();
+#if ENABLE(CFPREFS_DIRECT_MODE)
     void unblockPreferenceServiceIfNeeded();
 #endif
+#endif
 
 #if PLATFORM(IOS_FAMILY)
     void processWasResumed(CompletionHandler<void()>&&);

Modified: branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebProcess.h (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebProcess.h	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebProcess.h	2020-03-17 19:10:54 UTC (rev 258570)
@@ -310,10 +310,12 @@
 #if ENABLE(REMOTE_INSPECTOR)
     void enableRemoteWebInspector(const SandboxExtension::Handle&);
 #endif
+    void unblockAccessibilityServer(const SandboxExtension::Handle&);
+#if ENABLE(CFPREFS_DIRECT_MODE)
     void notifyPreferencesChanged(const String& domain, const String& key, const Optional<String>& encodedValue);
-    void unblockAccessibilityServer(const SandboxExtension::Handle&);
     void unblockPreferenceService(const SandboxExtension::Handle&);
 #endif
+#endif
 
     bool areAllPagesThrottleable() const;
 

Modified: branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebProcess.messages.in (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebProcess.messages.in	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WebKit/WebProcess/WebProcess.messages.in	2020-03-17 19:10:54 UTC (rev 258570)
@@ -169,8 +169,10 @@
 #endif
 
 #if PLATFORM(COCOA)
+    UnblockAccessibilityServer(WebKit::SandboxExtension::Handle handle)
+#if ENABLE(CFPREFS_DIRECT_MODE)
     NotifyPreferencesChanged(String domain, String key, Optional<String> encodedValue)
-    UnblockAccessibilityServer(WebKit::SandboxExtension::Handle handle)
     UnblockPreferenceService(WebKit::SandboxExtension::Handle handle)
 #endif
+#endif
 }

Modified: branches/safari-610.1.7-branch/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in (258569 => 258570)


--- branches/safari-610.1.7-branch/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2020-03-17 19:10:49 UTC (rev 258569)
+++ branches/safari-610.1.7-branch/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in	2020-03-17 19:10:54 UTC (rev 258570)
@@ -644,9 +644,7 @@
     (with report) (with telemetry)
 #endif
     (global-name "com.apple.PowerManagement.control")
-#if !ENABLE(CFPREFS_DIRECT_MODE)
     (global-name "com.apple.cfprefsd.daemon")
-#endif
     (global-name "com.apple.coreservices.launchservicesd")
     (global-name "com.apple.lsd.mapdb")
     (global-name "com.apple.trustd.agent")
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to