Skip to content
  • weinig@apple.com's avatar
    Enable XPC Service based WebProcess with runtime flag · 342392b9
    weinig@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=93773
    
    Reviewed by Dan Bernstein.
    
    Source/WebKit2: 
    
    Use the XPC Service for WebProcess code path if WEBKIT_USE_XPC_SERVICE_FOR_WEB_PROCESS
    is set in the environment.
    
    * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
    (WebKit::launchXPCService):
    Fix issue that was causing this code not to compile. This was not caught before since
    the code was not being built.
            
    * UIProcess/WebProcessProxy.cpp:
    (WebKit::WebProcessProxy::connect):
    Switch from hard coding always using the XPC Service code path if
    HAVE(XPC) was true, to doing it conditionally on an environment variable.
    
    Source/WTF: 
    
    * wtf/Platform.h:
    Define HAVE_XPC on 10.7 and later.
    
    Tools: 
    
    Convert --use-web-process-xpc-service passed to run-safari (and similar scripts)
    to setting WEBKIT_USE_XPC_SERVICE_FOR_WEB_PROCESS=YES in the environment and setting
    up __XPC_DYLD_FRAMEWORK_PATH and __XPC_DYLD_INSERT_LIBRARIES variables. NOTE: using
    the XPC service is not the default code path.
    
    * Scripts/webkitdirs.pm:
    (shouldUseXPCServiceForWebProcess):
    (determineShouldUseXPCServiceForWebProcess):
    Add functions to extract --use-web-process-xpc-service from ARGV and set a
    global variable.
    
    (printHelpAndExitForRunAndDebugWebKitAppIfNeeded):
    Add help text for --use-web-process-xpc-service.
    
    (runMacWebKitApp):
    Set the WEBKIT_USE_XPC_SERVICE_FOR_WEB_PROCESS environment variable and DYLD
    if --use-web-process-xpc-service was passed on the command line.
    
    (execMacWebKitAppForDebugging):
    Set the WEBKIT_USE_XPC_SERVICE_FOR_WEB_PROCESS environment variable and DYLD
    if --use-web-process-xpc-service was passed on the command line. Also, bail
    if both --use-web-process-xpc-service and --target-web-process are passed on
    the command line, as we don't currently support using both.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125361 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    342392b9