Title: [258569] branches/safari-610.1.7-branch/Source/WebKit
- Revision
- 258569
- Author
- [email protected]
- Date
- 2020-03-17 12:10:49 -0700 (Tue, 17 Mar 2020)
Log Message
Cherry-pick r258512. rdar://problem/60517387
[Cocoa] Only set CF prefs direct mode for the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=209091
<rdar://problem/60337842>
Reviewed by Brent Fulgham.
Currently, we enable CF prefs direct mode in XPCServiceMain. This is incorrect, it should only be enabled
for the WebContent process.
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceMain):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-610.1.7-branch/Source/WebKit/ChangeLog (258568 => 258569)
--- branches/safari-610.1.7-branch/Source/WebKit/ChangeLog 2020-03-17 19:03:40 UTC (rev 258568)
+++ branches/safari-610.1.7-branch/Source/WebKit/ChangeLog 2020-03-17 19:10:49 UTC (rev 258569)
@@ -1,3 +1,36 @@
+2020-03-17 Alan Coon <[email protected]>
+
+ Cherry-pick r258512. rdar://problem/60517387
+
+ [Cocoa] Only set CF prefs direct mode for the WebContent process
+ https://bugs.webkit.org/show_bug.cgi?id=209091
+ <rdar://problem/60337842>
+
+ Reviewed by Brent Fulgham.
+
+ Currently, we enable CF prefs direct mode in XPCServiceMain. This is incorrect, it should only be enabled
+ for the WebContent process.
+
+ * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
+ (WebKit::XPCServiceMain):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258512 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-03-16 Per Arne Vollan <[email protected]>
+
+ [Cocoa] Only set CF prefs direct mode for the WebContent process
+ https://bugs.webkit.org/show_bug.cgi?id=209091
+ <rdar://problem/60337842>
+
+ Reviewed by Brent Fulgham.
+
+ Currently, we enable CF prefs direct mode in XPCServiceMain. This is incorrect, it should only be enabled
+ for the WebContent process.
+
+ * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
+ (WebKit::XPCServiceMain):
+
2020-03-11 Russell Epstein <[email protected]>
Cherry-pick r258304. rdar://problem/60351239
Modified: branches/safari-610.1.7-branch/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm (258568 => 258569)
--- branches/safari-610.1.7-branch/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm 2020-03-17 19:03:40 UTC (rev 258568)
+++ branches/safari-610.1.7-branch/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm 2020-03-17 19:10:49 UTC (rev 258569)
@@ -70,7 +70,6 @@
else
RELEASE_ASSERT_NOT_REACHED();
-
typedef void (*InitializerFunction)(xpc_connection_t, xpc_object_t, xpc_object_t);
InitializerFunction initializerFunctionPtr = reinterpret_cast<InitializerFunction>(CFBundleGetFunctionPointerForName(webKitBundle, entryPointFunctionName));
if (!initializerFunctionPtr) {
@@ -106,8 +105,17 @@
xpc_connection_resume(peer);
}
-int XPCServiceMain(int, const char**)
+int XPCServiceMain(int argc, const char** argv)
{
+ ASSERT(argc >= 1);
+ ASSERT(argv[0]);
+#if ENABLE(CFPREFS_DIRECT_MODE)
+ if (argc >= 1 && argv[0] && strstr(argv[0], "com.apple.WebKit.WebContent")) {
+ // Enable CFPrefs direct mode to avoid unsuccessfully attempting to connect to the daemon and getting blocked by the sandbox.
+ _CFPrefsSetDirectModeEnabled(YES);
+ }
+#endif
+
auto bootstrap = adoptOSObject(xpc_copy_bootstrap());
#if PLATFORM(IOS_FAMILY)
auto containerEnvironmentVariables = xpc_dictionary_get_value(bootstrap.get(), "ContainerEnvironmentVariables");
@@ -117,11 +125,6 @@
});
#endif
-#if ENABLE(CFPREFS_DIRECT_MODE)
- // Enable CF prefs direct mode to avoid connecting to the CF prefs daemon.
- _CFPrefsSetDirectModeEnabled(YES);
-#endif
-
if (bootstrap) {
#if PLATFORM(MAC)
if (const char* webKitBundleVersion = xpc_dictionary_get_string(bootstrap.get(), "WebKitBundleVersion")) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes