Remove more unused process launching code
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Feb 2016 19:58:33 +0000 (19:58 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Feb 2016 19:58:33 +0000 (19:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=154178

Reviewed by Tim Horton.

* UIProcess/Databases/mac/DatabaseProcessProxyMac.mm:
(WebKit::shouldUseXPC): Deleted.
(WebKit::DatabaseProcessProxy::platformGetLaunchOptions): Deleted.
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Launcher/mac/EnvironmentVariables.cpp:
(WebKit::EnvironmentVariables::preexistingProcessServiceNameKey): Deleted.
(WebKit::EnvironmentVariables::preexistingProcessTypeKey): Deleted.
* UIProcess/Launcher/mac/EnvironmentVariables.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):
(WebKit::setUpTerminationNotificationHandler): Deleted.
(WebKit::addDYLDEnvironmentAdditions): Deleted.
(WebKit::tryPreexistingProcess): Deleted.
(WebKit::createProcess): Deleted.
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::shouldUseXPC): Deleted.
(WebKit::NetworkProcessProxy::platformGetLaunchOptions): Deleted.
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformGetLaunchOptions): Deleted.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::platformGetLaunchOptions): Deleted.
* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::shouldUseXPC): Deleted.
(WebKit::WebProcessProxy::platformGetLaunchOptions): Deleted.

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Databases/mac/DatabaseProcessProxyMac.mm
Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h
Source/WebKit2/UIProcess/Launcher/mac/EnvironmentVariables.cpp
Source/WebKit2/UIProcess/Launcher/mac/EnvironmentVariables.h
Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm
Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm
Source/WebKit2/UIProcess/ios/WebProcessProxyIOS.mm
Source/WebKit2/UIProcess/mac/WebProcessProxyMac.mm

index 0caa6fb..4cf3212 100644 (file)
@@ -1,3 +1,35 @@
+2016-02-12  Anders Carlsson  <andersca@apple.com>
+
+        Remove more unused process launching code
+        https://bugs.webkit.org/show_bug.cgi?id=154178
+
+        Reviewed by Tim Horton.
+
+        * UIProcess/Databases/mac/DatabaseProcessProxyMac.mm:
+        (WebKit::shouldUseXPC): Deleted.
+        (WebKit::DatabaseProcessProxy::platformGetLaunchOptions): Deleted.
+        * UIProcess/Launcher/ProcessLauncher.h:
+        * UIProcess/Launcher/mac/EnvironmentVariables.cpp:
+        (WebKit::EnvironmentVariables::preexistingProcessServiceNameKey): Deleted.
+        (WebKit::EnvironmentVariables::preexistingProcessTypeKey): Deleted.
+        * UIProcess/Launcher/mac/EnvironmentVariables.h:
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        (WebKit::ProcessLauncher::launchProcess):
+        (WebKit::setUpTerminationNotificationHandler): Deleted.
+        (WebKit::addDYLDEnvironmentAdditions): Deleted.
+        (WebKit::tryPreexistingProcess): Deleted.
+        (WebKit::createProcess): Deleted.
+        * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
+        (WebKit::shouldUseXPC): Deleted.
+        (WebKit::NetworkProcessProxy::platformGetLaunchOptions): Deleted.
+        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
+        (WebKit::PluginProcessProxy::platformGetLaunchOptions): Deleted.
+        * UIProcess/ios/WebProcessProxyIOS.mm:
+        (WebKit::WebProcessProxy::platformGetLaunchOptions): Deleted.
+        * UIProcess/mac/WebProcessProxyMac.mm:
+        (WebKit::shouldUseXPC): Deleted.
+        (WebKit::WebProcessProxy::platformGetLaunchOptions): Deleted.
+
 2016-02-12  Brian Burg  <bburg@apple.com>
 
         Add a WebKit SPI for creating an automation session and advertise the active session via RemoteInspector
index 3c8ec83..c41ea18 100644 (file)
@@ -32,19 +32,10 @@ using namespace WebCore;
 
 namespace WebKit {
 
-static bool shouldUseXPC()
-{
-    if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKit2UseXPCServiceForWebProcess"])
-        return [value boolValue];
-
-    return true;
-}
-
 void DatabaseProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions)
 {
     launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
     launchOptions.executableHeap = false;
-    launchOptions.useXPC = shouldUseXPC();
 }
 
 } // namespace WebKit
index 200dbae..c284236 100644 (file)
@@ -63,7 +63,6 @@ public:
         static const cpu_type_t MatchCurrentArchitecture = 0;
         cpu_type_t architecture;
         bool executableHeap;
-        bool useXPC;
 #endif
 #if PLATFORM(EFL) || PLATFORM(GTK)
 #ifndef NDEBUG
index 1a1bf3b..e3be255 100644 (file)
@@ -136,16 +136,6 @@ void EnvironmentVariables::copyEnvironmentVariables()
     m_environmentPointer = m_environmentVariables.data();
 }
 
-const char* EnvironmentVariables::preexistingProcessServiceNameKey()
-{
-    return "WEBKIT_PREEXISTING_PROCESS_SERVICE_NAME";
-}
-
-const char* EnvironmentVariables::preexistingProcessTypeKey()
-{
-    return "WEBKIT_PREEXISTING_PROCESS_TYPE";
-}
-
 void EnvironmentVariables::dump()
 {
     for (size_t i = 0; (*_NSGetEnviron())[i]; i++)
index 78343cf..1ce53ba 100644 (file)
@@ -46,9 +46,6 @@ public:
 
     char** environmentPointer() const { return m_environmentPointer; }
 
-    static const char* preexistingProcessServiceNameKey();
-    static const char* preexistingProcessTypeKey();
-
     static void dump();
 
 private:
index 2b4b808..72e079b 100644 (file)
@@ -66,20 +66,6 @@ struct UUIDHolder : public RefCounted<UUIDHolder> {
 
 }
 
-static void setUpTerminationNotificationHandler(pid_t pid)
-{
-    dispatch_source_t processDiedSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_PROC, pid, DISPATCH_PROC_EXIT, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0));
-    dispatch_source_set_event_handler(processDiedSource, ^{
-        int status;
-        waitpid(dispatch_source_get_handle(processDiedSource), &status, 0);
-        dispatch_source_cancel(processDiedSource);
-    });
-    dispatch_source_set_cancel_handler(processDiedSource, ^{
-        dispatch_release(processDiedSource);
-    });
-    dispatch_resume(processDiedSource);
-}
-
 #if ASAN_ENABLED
 static const char* copyASanDynamicLibraryPath()
 {
@@ -93,59 +79,6 @@ static const char* copyASanDynamicLibraryPath()
 }
 #endif
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101100
-static RetainPtr<NSString> computeProcessShimPath(const ProcessLauncher::LaunchOptions& launchOptions, NSBundle *webKitBundle)
-{
-#if ENABLE(NETSCAPE_PLUGIN_API)
-    if (launchOptions.processType == ProcessLauncher::PluginProcess)
-        return [[webKitBundle privateFrameworksPath] stringByAppendingPathComponent:@"PluginProcessShim.dylib"];
-#endif
-
-    if (launchOptions.processType == ProcessLauncher::NetworkProcess)
-        return [[webKitBundle privateFrameworksPath] stringByAppendingPathComponent:@"SecItemShim.dylib"];
-
-    if (launchOptions.processType == ProcessLauncher::WebProcess)
-        return [[webKitBundle privateFrameworksPath] stringByAppendingPathComponent:@"WebProcessShim.dylib"];
-
-    return nil;
-}
-#endif
-
-static void addDYLDEnvironmentAdditions(const ProcessLauncher::LaunchOptions& launchOptions, bool isWebKitDevelopmentBuild, EnvironmentVariables& environmentVariables)
-{
-    DynamicLinkerEnvironmentExtractor environmentExtractor([[NSBundle mainBundle] executablePath], _NSGetMachExecuteHeader()->cputype);
-    environmentExtractor.getExtractedEnvironmentVariables(environmentVariables);
-
-    NSBundle *webKitBundle = [NSBundle bundleWithIdentifier:@"com.apple.WebKit"];
-    NSString *frameworksPath = [[webKitBundle bundlePath] stringByDeletingLastPathComponent];
-
-    // To make engineering builds work, if the path is outside of /System set up
-    // DYLD_FRAMEWORK_PATH to pick up other frameworks, but don't do it for the
-    // production configuration because it involves extra file system access.
-    if (isWebKitDevelopmentBuild) {
-        environmentVariables.appendValue("DYLD_FRAMEWORK_PATH", [frameworksPath fileSystemRepresentation], ':');
-        environmentVariables.appendValue("DYLD_LIBRARY_PATH", webKitBundle.privateFrameworksPath.fileSystemRepresentation, ':');
-    }
-
-#if ASAN_ENABLED
-    static const char* asanLibraryPath = copyASanDynamicLibraryPath();
-    ASSERT(asanLibraryPath); // ASan runtime library was not found in the current process. This code may need to be updated if the library name has changed.
-    // ASan doesn't require this library to be inserted, but it otherwise automatically performs a re-exec, making the child process stop in a debugger on launch one extra time.
-    if (asanLibraryPath)
-        environmentVariables.appendValue("DYLD_INSERT_LIBRARIES", asanLibraryPath, ':');
-#endif
-
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101100
-    if (auto shimPath = computeProcessShimPath(launchOptions, webKitBundle)) {
-        // Make sure that the shim library file exists and insert it.
-        const char* processShimPath = [shimPath fileSystemRepresentation];
-        struct stat statBuf;
-        if (stat(processShimPath, &statBuf) == 0 && (statBuf.st_mode & S_IFMT) == S_IFREG)
-            environmentVariables.appendValue("DYLD_INSERT_LIBRARIES", processShimPath, ':');
-    }
-#endif
-}
-
 typedef void (ProcessLauncher::*DidFinishLaunchingProcessFunction)(PlatformProcessIdentifier, IPC::Connection::Identifier);
 
 static const char* serviceName(const ProcessLauncher::LaunchOptions& launchOptions)
@@ -304,198 +237,6 @@ static void createService(const ProcessLauncher::LaunchOptions& launchOptions, b
     connectToService(launchOptions, forDevelopment, that, didFinishLaunchingProcessFunction, instanceUUID.get());
 }
 
-static bool tryPreexistingProcess(const ProcessLauncher::LaunchOptions& launchOptions, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction)
-{
-    EnvironmentVariables environmentVariables;
-    static const char* preexistingProcessServiceName = environmentVariables.get(EnvironmentVariables::preexistingProcessServiceNameKey());
-
-    ProcessLauncher::ProcessType preexistingProcessType;
-    if (preexistingProcessServiceName)
-        ProcessLauncher::getProcessTypeFromString(environmentVariables.get(EnvironmentVariables::preexistingProcessTypeKey()), preexistingProcessType);
-
-    bool usePreexistingProcess = preexistingProcessServiceName && preexistingProcessType == launchOptions.processType;
-    if (!usePreexistingProcess)
-        return false;
-
-    // Create the listening port.
-    mach_port_t listeningPort;
-    mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
-    
-    // Insert a send right so we can send to it.
-    mach_port_insert_right(mach_task_self(), listeningPort, listeningPort, MACH_MSG_TYPE_MAKE_SEND);
-
-    pid_t processIdentifier = 0;
-
-    mach_port_t lookupPort;
-    bootstrap_look_up(bootstrap_port, preexistingProcessServiceName, &lookupPort);
-
-    mach_msg_header_t header;
-    header.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, MACH_MSG_TYPE_MAKE_SEND);
-    header.msgh_id = 0;
-    header.msgh_local_port = listeningPort;
-    header.msgh_remote_port = lookupPort;
-    header.msgh_size = sizeof(header);
-    kern_return_t kr = mach_msg(&header, MACH_SEND_MSG, sizeof(header), 0, MACH_PORT_NULL, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
-
-    mach_port_deallocate(mach_task_self(), lookupPort);
-    preexistingProcessServiceName = 0;
-
-    if (kr) {
-        LOG_ERROR("Failed to pick up preexisting process at %s (%x). Launching a new process of type %s instead.", preexistingProcessServiceName, kr, ProcessLauncher::processTypeAsString(launchOptions.processType));
-        return false;
-    }
-    
-    // We've finished launching the process, message back to the main run loop.
-    RefPtr<ProcessLauncher> protector(that);
-    RunLoop::main().dispatch([protector, didFinishLaunchingProcessFunction, processIdentifier, listeningPort] {
-        (*protector.*didFinishLaunchingProcessFunction)(processIdentifier, IPC::Connection::Identifier(listeningPort));
-    });
-    return true;
-}
-
-static void createProcess(const ProcessLauncher::LaunchOptions& launchOptions, bool isWebKitDevelopmentBuild, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction)
-{
-    EnvironmentVariables environmentVariables;
-    addDYLDEnvironmentAdditions(launchOptions, isWebKitDevelopmentBuild, environmentVariables);
-
-    // Create the listening port.
-    mach_port_t listeningPort;
-    mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
-
-    // Insert a send right so we can send to it.
-    mach_port_insert_right(mach_task_self(), listeningPort, listeningPort, MACH_MSG_TYPE_MAKE_SEND);
-
-    NSBundle *webKitBundle = [NSBundle bundleWithIdentifier:@"com.apple.WebKit"];
-
-    NSString *processPath = nil;
-    switch (launchOptions.processType) {
-    case ProcessLauncher::WebProcess:
-        processPath = [webKitBundle pathForAuxiliaryExecutable:@"WebProcess.app"];
-        break;
-#if ENABLE(NETSCAPE_PLUGIN_API)
-    case ProcessLauncher::PluginProcess:
-        processPath = [webKitBundle pathForAuxiliaryExecutable:@"PluginProcess.app"];
-        break;
-#endif
-    case ProcessLauncher::NetworkProcess:
-        processPath = [webKitBundle pathForAuxiliaryExecutable:@"NetworkProcess.app"];
-        break;
-#if ENABLE(DATABASE_PROCESS)
-    case ProcessLauncher::DatabaseProcess:
-        processPath = [webKitBundle pathForAuxiliaryExecutable:@"DatabaseProcess.app"];
-        break;
-#endif
-    }
-
-    NSString *frameworkExecutablePath = [webKitBundle executablePath];
-    NSString *processAppExecutablePath = [[NSBundle bundleWithPath:processPath] executablePath];
-
-    NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier];
-    CString clientIdentifier = bundleIdentifier ? String([[NSBundle mainBundle] bundleIdentifier]).utf8() : *_NSGetProgname();
-
-    // Make a unique, per pid, per process launcher web process service name.
-    CString serviceName = String::format("com.apple.WebKit.WebProcess-%d-%p", getpid(), that).utf8();
-
-    // Inherit UI process localization. It can be different from child process default localization:
-    // 1. When the application and system frameworks simply have different localized resources available, we should match the application.
-    // 1.1. An important case is WebKitTestRunner, where we should use English localizations for all system frameworks.
-    // 2. When AppleLanguages is passed as command line argument for UI process, or set in its preferences, we should respect it in child processes.
-    CString appleLanguagesArgument = String("('" + String(preferredBundleLocalizationName()) + "')").utf8();
-
-    Vector<const char*> args;
-    args.append([processAppExecutablePath fileSystemRepresentation]);
-    args.append([frameworkExecutablePath fileSystemRepresentation]);
-    args.append("-type");
-    args.append(ProcessLauncher::processTypeAsString(launchOptions.processType));
-    args.append("-servicename");
-    args.append(serviceName.data());
-    args.append("-client-identifier");
-    args.append(clientIdentifier.data());
-    args.append("-ui-process-name");
-    args.append([[[NSProcessInfo processInfo] processName] UTF8String]);
-    args.append("-AppleLanguages"); // This argument will be handled by Core Foundation.
-    args.append(appleLanguagesArgument.data());
-
-    HashMap<String, String>::const_iterator it = launchOptions.extraInitializationData.begin();
-    HashMap<String, String>::const_iterator end = launchOptions.extraInitializationData.end();
-    Vector<CString> temps;
-    for (; it != end; ++it) {
-        String keyPlusDash = "-" + it->key;
-        CString key(keyPlusDash.utf8().data());
-        temps.append(key);
-        args.append(key.data());
-
-        CString value(it->value.utf8().data());
-        temps.append(value);
-        args.append(value.data());
-    }
-
-    args.append(nullptr);
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-    // Register ourselves.
-    kern_return_t kr = bootstrap_register2(bootstrap_port, const_cast<char*>(serviceName.data()), listeningPort, 0);
-    ASSERT_UNUSED(kr, kr == KERN_SUCCESS);
-#pragma clang diagnostic pop
-
-    posix_spawnattr_t attr;
-    posix_spawnattr_init(&attr);
-
-    short flags = 0;
-
-    // We want our process to receive all signals.
-    sigset_t signalMaskSet;
-    sigemptyset(&signalMaskSet);
-
-    posix_spawnattr_setsigmask(&attr, &signalMaskSet);
-    flags |= POSIX_SPAWN_SETSIGMASK;
-
-    // Determine the architecture to use.
-    cpu_type_t architecture = launchOptions.architecture;
-    if (architecture == ProcessLauncher::LaunchOptions::MatchCurrentArchitecture)
-        architecture = _NSGetMachExecuteHeader()->cputype;
-
-    cpu_type_t cpuTypes[] = { architecture };
-    size_t outCount = 0;
-    posix_spawnattr_setbinpref_np(&attr, 1, cpuTypes, &outCount);
-
-    // Start suspended so we can set up the termination notification handler.
-    flags |= POSIX_SPAWN_START_SUSPENDED;
-
-    static const int allowExecutableHeapFlag = 0x2000;
-    if (launchOptions.executableHeap)
-        flags |= allowExecutableHeapFlag;
-
-    posix_spawnattr_setflags(&attr, flags);
-
-    pid_t processIdentifier = 0;
-    int result = posix_spawn(&processIdentifier, args[0], 0, &attr, const_cast<char**>(args.data()), environmentVariables.environmentPointer());
-
-    posix_spawnattr_destroy(&attr);
-
-    if (!result) {
-        // Set up the termination notification handler and then ask the child process to continue.
-        setUpTerminationNotificationHandler(processIdentifier);
-        kill(processIdentifier, SIGCONT);
-    } else {
-        // We failed to launch. Release the send right.
-        mach_port_deallocate(mach_task_self(), listeningPort);
-
-        // And the receive right.
-        mach_port_mod_refs(mach_task_self(), listeningPort, MACH_PORT_RIGHT_RECEIVE, -1);
-    
-        listeningPort = MACH_PORT_NULL;
-        processIdentifier = 0;
-    }
-
-    // We've finished launching the process, message back to the main run loop.
-    RefPtr<ProcessLauncher> protector(that);
-    RunLoop::main().dispatch([protector, didFinishLaunchingProcessFunction, processIdentifier, listeningPort] {
-        (*protector.*didFinishLaunchingProcessFunction)(processIdentifier, IPC::Connection::Identifier(listeningPort));
-    });
-}
-
 static NSString *systemDirectoryPath()
 {
     static NSString *path = [^{
@@ -512,17 +253,9 @@ static NSString *systemDirectoryPath()
 
 void ProcessLauncher::launchProcess()
 {
-    if (tryPreexistingProcess(m_launchOptions, this, &ProcessLauncher::didFinishLaunchingProcess))
-        return;
-
     bool isWebKitDevelopmentBuild = ![[[[NSBundle bundleWithIdentifier:@"com.apple.WebKit"] bundlePath] stringByDeletingLastPathComponent] hasPrefix:systemDirectoryPath()];
 
-    if (m_launchOptions.useXPC) {
-        createService(m_launchOptions, isWebKitDevelopmentBuild, this, &ProcessLauncher::didFinishLaunchingProcess);
-        return;
-    }
-
-    createProcess(m_launchOptions, isWebKitDevelopmentBuild, this, &ProcessLauncher::didFinishLaunchingProcess);
+    createService(m_launchOptions, isWebKitDevelopmentBuild, this, &ProcessLauncher::didFinishLaunchingProcess);
 }
 
 void ProcessLauncher::terminateProcess()
index 19f7225..b571871 100644 (file)
@@ -40,20 +40,10 @@ void NetworkProcessProxy::setProcessSuppressionEnabled(bool processSuppressionEn
     connection()->send(Messages::NetworkProcess::SetProcessSuppressionEnabled(processSuppressionEnabled), 0);
 }
 
-static bool shouldUseXPC()
-{
-    if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKit2UseXPCServiceForWebProcess"])
-        return [value boolValue];
-
-    return true;
-}
-
 void NetworkProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions)
 {
     launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
     launchOptions.executableHeap = false;
-
-    launchOptions.useXPC = shouldUseXPC();
 }
 
 } // namespace WebKit
index 6ac1adc..93a01a5 100644 (file)
@@ -123,8 +123,6 @@ void PluginProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions
         else
             WTFLogAlways("Main process is sandboxed, ignoring plug-in sandbox policy");
     }
-
-    launchOptions.useXPC = true;
 }
 
 void PluginProcessProxy::platformInitializePluginProcess(PluginProcessCreationParameters& parameters)
index b2a2c7e..2f90c94 100644 (file)
@@ -45,8 +45,6 @@ void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& l
     // We want the web process to match the architecture of the UI process.
     launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
     launchOptions.executableHeap = false;
-
-    launchOptions.useXPC = true;
 }
 
 } // namespace WebKit
index 461de44..ebccb36 100644 (file)
@@ -37,19 +37,11 @@ bool WebProcessProxy::fullKeyboardAccessEnabled()
     return [WKFullKeyboardAccessWatcher fullKeyboardAccessEnabled];
 }
 
-static bool shouldUseXPC()
-{
-    if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKit2UseXPCServiceForWebProcess"])
-        return [value boolValue];
-    return true;
-}
-
 void WebProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions)
 {
     // We want the web process to match the architecture of the UI process.
     launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
     launchOptions.executableHeap = false;
-    launchOptions.useXPC = shouldUseXPC();
 }
 
 } // namespace WebKit