Title: [130318] trunk/Source/WebKit2
Revision
130318
Author
ander...@apple.com
Date
2012-10-03 14:00:29 -0700 (Wed, 03 Oct 2012)

Log Message

Use the XPC service by default on newer systems
https://bugs.webkit.org/show_bug.cgi?id=98297
<rdar://problem/12424641>

Reviewed by Sam Weinig.

* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::shouldUseXPC):
Return false for older systems.

(WebKit::WebProcessProxy::platformConnect):
Call shouldUseXPC().

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (130317 => 130318)


--- trunk/Source/WebKit2/ChangeLog	2012-10-03 20:17:48 UTC (rev 130317)
+++ trunk/Source/WebKit2/ChangeLog	2012-10-03 21:00:29 UTC (rev 130318)
@@ -1,3 +1,18 @@
+2012-10-03  Anders Carlsson  <ander...@apple.com>
+
+        Use the XPC service by default on newer systems
+        https://bugs.webkit.org/show_bug.cgi?id=98297
+        <rdar://problem/12424641>
+
+        Reviewed by Sam Weinig.
+
+        * UIProcess/mac/WebProcessProxyMac.mm:
+        (WebKit::shouldUseXPC):
+        Return false for older systems.
+
+        (WebKit::WebProcessProxy::platformConnect):
+        Call shouldUseXPC().
+
 2012-10-02  Andy Estes  <aes...@apple.com>
 
         [WebKit2] Add the ability to send messages to the WebPageGroupProxy

Modified: trunk/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm (130317 => 130318)


--- trunk/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm	2012-10-03 20:17:48 UTC (rev 130317)
+++ trunk/Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm	2012-10-03 21:00:29 UTC (rev 130318)
@@ -149,6 +149,20 @@
     return [WKFullKeyboardAccessWatcher fullKeyboardAccessEnabled];
 }
 
+#if HAVE(XPC)
+static bool shouldUseXPC()
+{
+    if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKit2UseXPCServiceForWebProcess"])
+        return [value boolValue];
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+    return true;
+#else
+    return false;
+#endif
+}
+#endif
+
 void WebProcessProxy::platformConnect(ProcessLauncher::LaunchOptions& launchOptions)
 {
     // We want the web process to match the architecture of the UI process.
@@ -156,7 +170,7 @@
     launchOptions.executableHeap = false;
 
 #if HAVE(XPC)
-    launchOptions.useXPC = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKit2UseXPCServiceForWebProcess"];
+    launchOptions.useXPC = shouldUseXPC();
 #endif
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to