Changeset 140924 in webkit


Ignore:
Timestamp:
Jan 26, 2013 9:32:53 PM (11 years ago)
Author:
weinig@apple.com
Message:

Add support for running the networking process as an XPCService
https://bugs.webkit.org/show_bug.cgi?id=108025

Reviewed by Dan Bernstein.

  • Configurations/NetworkService.Development.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.Development.xcconfig.
  • Configurations/NetworkService.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.xcconfig.

Add configurations.

  • NetworkProcess/EntryPoint/mac/XPCService: Added.
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService: Added.
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development: Added.
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist.
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm.
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist.
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm.
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm.

(initializeNetworkService):
Add entry points.

  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::serviceName):
(WebKit::connectToServiceForDevelopment):
(WebKit::createServiceForDevelopment):
(WebKit::createService):
(WebKit::createProcess):
(WebKit::ProcessLauncher::launchProcess):
Rework service creation to work for arbitrary services.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::~NetworkProcessProxy):
(WebKit::NetworkProcessProxy::getLaunchOptions):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/Network/mac/NetworkProcessProxyMac.mm:

(WebKit::shouldUseXPC):
(WebKit::NetworkProcessProxy::platformGetLaunchOptions):
Opt into xpc using the same rules as the WebProcess.

  • WebKit2.xcodeproj/project.pbxproj:

Update files.

  • WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:

(initializeWebContentService):
Fix the comment to refer to the shim correctly.

Location:
trunk/Source/WebKit2
Files:
3 added
7 edited
7 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r140922 r140924  
     12013-01-26  Sam Weinig  <sam@webkit.org>
     2
     3        Add support for running the networking process as an XPCService
     4        https://bugs.webkit.org/show_bug.cgi?id=108025
     5
     6        Reviewed by Dan Bernstein.
     7
     8        * Configurations/NetworkService.Development.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.Development.xcconfig.
     9        * Configurations/NetworkService.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.xcconfig.
     10        Add configurations.
     11
     12        * NetworkProcess/EntryPoint/mac/XPCService: Added.
     13        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService: Added.
     14        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development: Added.
     15        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist.
     16        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm.
     17        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist.
     18        * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm.
     19        * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm.
     20        (initializeNetworkService):
     21        Add entry points.
     22
     23        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
     24        (WebKit::serviceName):
     25        (WebKit::connectToServiceForDevelopment):
     26        (WebKit::createServiceForDevelopment):
     27        (WebKit::createService):
     28        (WebKit::createProcess):
     29        (WebKit::ProcessLauncher::launchProcess):
     30        Rework service creation to work for arbitrary services.
     31
     32        * UIProcess/Network/NetworkProcessProxy.cpp:
     33        (WebKit::NetworkProcessProxy::~NetworkProcessProxy):
     34        (WebKit::NetworkProcessProxy::getLaunchOptions):
     35        * UIProcess/Network/NetworkProcessProxy.h:
     36        * UIProcess/Network/mac/NetworkProcessProxyMac.mm:
     37        (WebKit::shouldUseXPC):
     38        (WebKit::NetworkProcessProxy::platformGetLaunchOptions):
     39        Opt into xpc using the same rules as the WebProcess.
     40
     41        * WebKit2.xcodeproj/project.pbxproj:
     42        Update files.
     43
     44        * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
     45        (initializeWebContentService):
     46        Fix the comment to refer to the shim correctly.
     47
    1482013-01-26  Sam Weinig  <sam@webkit.org>
    249
  • trunk/Source/WebKit2/Configurations/NetworkService.Development.xcconfig

    r140921 r140924  
    1 // Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
     1// Copyright (C) 2013 Apple Inc. All rights reserved.
    22//
    33// Redistribution and use in source and binary forms, with or without
     
    2424#include "BaseXPCService.xcconfig"
    2525
    26 PRODUCT_NAME = com.apple.WebKit.WebContent.Development;
    27 INFOPLIST_FILE = WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist;
     26PRODUCT_NAME = com.apple.WebKit.Networking.Development;
     27INFOPLIST_FILE = NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist;
  • trunk/Source/WebKit2/Configurations/NetworkService.xcconfig

    r140921 r140924  
    2424#include "BaseXPCService.xcconfig"
    2525
    26 PRODUCT_NAME = com.apple.WebKit.WebContent;
    27 INFOPLIST_FILE = WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist;
     26PRODUCT_NAME = com.apple.WebKit.Networking;
     27INFOPLIST_FILE = NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist;
  • trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist

    r140921 r140924  
    1010        <string>${EXECUTABLE_NAME}</string>
    1111        <key>CFBundleIdentifier</key>
    12         <string>com.apple.WebKit.WebContent.Development</string>
     12        <string>com.apple.WebKit.Networking.Development</string>
    1313        <key>CFBundleInfoDictionaryVersion</key>
    1414        <string>6.0</string>
     
    3434                <string>Application</string>
    3535                <key>RunLoopType</key>
    36                 <string>_NSApplicationMain</string>
     36                <string>NSRunLoop</string>
    3737                <key>_MultipleInstances</key>
    3838                <true/>
  • trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm

    r140921 r140924  
    2424 */
    2525
    26 #define WEBKIT_XPC_SERVICE_INITIALIZER initializeWebContentService
     26#define WEBKIT_XPC_SERVICE_INITIALIZER initializeNetworkService
    2727#include "XPCServiceBootstrapper.Development.h"
    2828
  • trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist

    r140921 r140924  
    1010        <string>${EXECUTABLE_NAME}</string>
    1111        <key>CFBundleIdentifier</key>
    12         <string>com.apple.WebKit.WebContent</string>
     12        <string>com.apple.WebKit.Networking</string>
    1313        <key>CFBundleInfoDictionaryVersion</key>
    1414        <string>6.0</string>
     
    3434                <string>Application</string>
    3535                <key>RunLoopType</key>
    36                 <string>_NSApplicationMain</string>
     36                <string>NSRunLoop</string>
    3737                <key>_MultipleInstances</key>
    3838                <true/>
  • trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm

    r140921 r140924  
    2424 */
    2525
    26 #define WEBKIT_XPC_SERVICE_INITIALIZER initializeWebContentService
     26#define WEBKIT_XPC_SERVICE_INITIALIZER initializeNetworkService
    2727#include "XPCServiceBootstrapper.h"
    2828
  • trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm

    r140921 r140924  
    11/*
    2  * Copyright (C) 2012 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3131#import "WKBase.h"
    3232#import "WebKit2Initialize.h"
    33 #import "WebProcess.h"
     33#import "NetworkProcess.h"
    3434#import <WebCore/RunLoop.h>
    3535#import <stdio.h>
     
    4040using namespace WebKit;
    4141
    42 extern "C" WK_EXPORT void initializeWebContentService(const char* clientIdentifier, xpc_connection_t connection, mach_port_t serverPort, const char* uiProcessName);
     42extern "C" WK_EXPORT void initializeNetworkService(const char* clientIdentifier, xpc_connection_t connection, mach_port_t serverPort, const char* uiProcessName);
    4343
    44 void initializeWebContentService(const char* clientIdentifier, xpc_connection_t connection, mach_port_t serverPort, const char* uiProcessName)
     44void initializeNetworkService(const char* clientIdentifier, xpc_connection_t connection, mach_port_t serverPort, const char* uiProcessName)
    4545{
    46     // Remove the WebProcess shim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by
    47     // the WebProcess don't try to insert the shim and crash.
     46    // Remove the SecItemShim shim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by
     47    // the this process don't try to insert the shim and crash.
    4848    EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/SecItemShim.dylib");
    4949
    50     RunLoop::setUseApplicationRunLoopOnMainRunLoop();
    5150    InitializeWebKit2();
    5251
     
    5655    parameters.connectionIdentifier = CoreIPC::Connection::Identifier(serverPort, connection);
    5756
    58     WebProcess::shared().initialize(parameters);
     57    NetworkProcess::shared().initialize(parameters);
    5958}
    6059
  • trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm

    r140636 r140924  
    7979}
    8080
     81static const char* serviceName(const ProcessLauncher::LaunchOptions& launchOptions, bool forDevelopment)
     82{
     83    switch (launchOptions.processType) {
     84    case ProcessLauncher::WebProcess:
     85        return forDevelopment ? "com.apple.WebKit.WebContent.Development" : "com.apple.WebKit.WebContent";
     86#if ENABLE(NETWORK_PROCESS)
     87    case ProcessLauncher::NetworkProcess:
     88        return forDevelopment ? "com.apple.WebKit.Networking.Development" : "com.apple.WebKit.Networking";
     89#endif
     90#if ENABLE(PLUGIN_PROCESS)
     91    case ProcessLauncher::PluginProcess:
     92        ASSERT_NOT_REACHED();
     93        return 0;
     94#endif
     95#if ENABLE(SHARED_WORKER_PROCESS)
     96    case ProcessLauncher::SharedWorkerProcess:
     97        ASSERT_NOT_REACHED();
     98        return 0;
     99#endif
     100    }
     101}
     102
     103
    81104static void setUpTerminationNotificationHandler(pid_t pid)
    82105{
     
    143166
    144167#if HAVE(XPC)
    145 static void connectToWebProcessServiceForWebKitDevelopment(const ProcessLauncher::LaunchOptions&, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction, UUIDHolder* instanceUUID)
     168static void connectToServiceForDevelopment(const ProcessLauncher::LaunchOptions& launchOptions, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction, UUIDHolder* instanceUUID)
    146169{
    147170    // Create a connection to the WebKit2 XPC service.
    148     xpc_connection_t connection = xpc_connection_create("com.apple.WebKit.WebContent.Development", 0);
     171    xpc_connection_t connection = xpc_connection_create(serviceName(launchOptions, true), 0);
    149172    xpc_connection_set_instance(connection, instanceUUID->uuid);
    150173
     
    200223}
    201224
    202 static void createWebProcessServiceForWebKitDevelopment(const ProcessLauncher::LaunchOptions& launchOptions, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction)
     225static void createServiceForDevelopment(const ProcessLauncher::LaunchOptions& launchOptions, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction)
    203226{
    204227    EnvironmentVariables environmentVariables;
     
    206229
    207230    // Generate the uuid for the service instance we are about to create.
    208     // FIXME: This UUID should be stored on the WebProcessProxy.
     231    // FIXME: This UUID should be stored on the ChildProcessProxy.
    209232    RefPtr<UUIDHolder> instanceUUID = UUIDHolder::create();
    210233
    211     xpc_connection_t reExecConnection = xpc_connection_create("com.apple.WebKit.WebContent.Development", 0);
     234    xpc_connection_t reExecConnection = xpc_connection_create(serviceName(launchOptions, true), 0);
    212235    xpc_connection_set_instance(reExecConnection, instanceUUID->uuid);
    213236
     
    221244        ASSERT(xpc_get_type(event) == XPC_TYPE_ERROR);
    222245
    223         connectToWebProcessServiceForWebKitDevelopment(launchOptions, that, didFinishLaunchingProcessFunction, instanceUUID.get());
     246        connectToServiceForDevelopment(launchOptions, that, didFinishLaunchingProcessFunction, instanceUUID.get());
    224247
    225248        // Release the connection.
     
    255278}
    256279
    257 static void createWebProcessService(const ProcessLauncher::LaunchOptions& launchOptions, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction)
     280static void createService(const ProcessLauncher::LaunchOptions& launchOptions, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction)
    258281{
    259282    // Generate the uuid for the service instance we are about to create.
    260     // FIXME: This UUID should be stored on the WebProcessProxy.
     283    // FIXME: This UUID should be stored on the ChildProcessProxy.
    261284    RefPtr<UUIDHolder> instanceUUID = UUIDHolder::create();
    262285
    263286    // Create a connection to the WebKit2 XPC service.
    264     xpc_connection_t connection = xpc_connection_create("com.apple.WebKit.WebContent", 0);
     287    xpc_connection_t connection = xpc_connection_create(serviceName(launchOptions, false), 0);
    265288    xpc_connection_set_instance(connection, instanceUUID->uuid);
    266289
     
    378401
    379402    NSString *processPath = nil;
    380     switch(launchOptions.processType) {
     403    switch (launchOptions.processType) {
    381404    case ProcessLauncher::WebProcess:
    382405        processPath = [webKit2Bundle pathForAuxiliaryExecutable:@"WebProcess.app"];
     
    478501#if HAVE(XPC)
    479502    if (m_launchOptions.useXPC) {
    480         if (m_launchOptions.processType == ProcessLauncher::WebProcess) {
    481             if (isWebKitDevelopmentBuild)
    482                 createWebProcessServiceForWebKitDevelopment(m_launchOptions, this, &ProcessLauncher::didFinishLaunchingProcess);
    483             else
    484                 createWebProcessService(m_launchOptions, this, &ProcessLauncher::didFinishLaunchingProcess);
    485         } else
    486             ASSERT_NOT_REACHED();
     503        if (isWebKitDevelopmentBuild)
     504            createServiceForDevelopment(m_launchOptions, this, &ProcessLauncher::didFinishLaunchingProcess);
     505        else
     506            createService(m_launchOptions, this, &ProcessLauncher::didFinishLaunchingProcess);
    487507        return;
    488508    }
  • trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp

    r140874 r140924  
    6262}
    6363
     64NetworkProcessProxy::~NetworkProcessProxy()
     65{
     66}
     67
    6468void NetworkProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions)
    6569{
    6670    launchOptions.processType = ProcessLauncher::NetworkProcess;
    67 
    68 #if PLATFORM(MAC)
    69     launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
    70     launchOptions.executableHeap = false;
    71 #if HAVE(XPC)
    72     launchOptions.useXPC = false;
    73 #endif
    74 #endif
    75 }
    76 
    77 NetworkProcessProxy::~NetworkProcessProxy()
    78 {
     71    platformGetLaunchOptions(launchOptions);
    7972}
    8073
  • trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h

    r140874 r140924  
    6868
    6969    virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) OVERRIDE;
     70    void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&);
    7071
    7172    void networkProcessCrashedOrFailedToLaunch();
  • trunk/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm

    r137821 r140924  
    4343}
    4444
     45#if HAVE(XPC)
     46static bool shouldUseXPC()
     47{
     48    if (id value = [[NSUserDefaults standardUserDefaults] objectForKey:@"WebKit2UseXPCServiceForWebProcess"])
     49        return [value boolValue];
     50
     51#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
     52    return true;
     53#else
     54    return false;
     55#endif
     56}
     57#endif
     58
     59void NetworkProcessProxy::platformGetLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions)
     60{
     61    launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
     62    launchOptions.executableHeap = false;
     63
     64#if HAVE(XPC)
     65    launchOptions.useXPC = shouldUseXPC();
     66#endif
     67}
     68
    4569} // namespace WebKit
    4670
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r140921 r140924  
    2121                                E13A8A4D16287A5B00392929 /* PBXTargetDependency */,
    2222                                510CC8481613C85300D03ED3 /* PBXTargetDependency */,
     23                                BCA8D46815BCE0D6009DC1F1 /* PBXTargetDependency */,
    2324                                BCAE9DFD160C0AB000A33217 /* PBXTargetDependency */,
    24                                 BCA8D46815BCE0D6009DC1F1 /* PBXTargetDependency */,
     25                                BC8283D516B4C01F00A278FE /* PBXTargetDependency */,
     26                                BC8283D716B4C02200A278FE /* PBXTargetDependency */,
    2527                        );
    2628                        name = All;
     
    799801                BC82839516B4608300A278FE /* SharedWorkerProcessMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC82839316B4607B00A278FE /* SharedWorkerProcessMain.mm */; };
    800802                BC82839916B48DC000A278FE /* WebContentServiceEntryPoint.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC82839816B48DC000A278FE /* WebContentServiceEntryPoint.mm */; };
     803                BC8283AC16B4BF3F00A278FE /* NetworkServiceEntryPoint.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8283A816B4BD9100A278FE /* NetworkServiceEntryPoint.mm */; };
     804                BC8283B316B4BF7700A278FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC8283B216B4BF7700A278FE /* Foundation.framework */; };
     805                BC8283C616B4BFA800A278FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC8283B216B4BF7700A278FE /* Foundation.framework */; };
     806                BC8283D816B4DB2A00A278FE /* NetworkServiceMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8283A416B4BD9100A278FE /* NetworkServiceMain.mm */; };
     807                BC8283D916B4DB2E00A278FE /* NetworkServiceMain.Development.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8283A716B4BD9100A278FE /* NetworkServiceMain.Development.mm */; };
     808                BC8283DA16B4DB9300A278FE /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* WebKit2.framework */; };
    801809                BC82DF2215BDF42200FC2841 /* com.apple.WebProcess.sb in Resources */ = {isa = PBXBuildFile; fileRef = E1967E37150AB5E200C73169 /* com.apple.WebProcess.sb */; };
    802810                BC8452A71162C80900CAB9B5 /* DrawingArea.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC8452A51162C80900CAB9B5 /* DrawingArea.cpp */; };
     
    11391147                        remoteGlobalIDString = 510031EA1379CACB00C8DFE4;
    11401148                        remoteInfo = SecItemShim;
     1149                };
     1150                BC8283D416B4C01F00A278FE /* PBXContainerItemProxy */ = {
     1151                        isa = PBXContainerItemProxy;
     1152                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
     1153                        proxyType = 1;
     1154                        remoteGlobalIDString = BC8283B016B4BF7700A278FE;
     1155                        remoteInfo = Networking;
     1156                };
     1157                BC8283D616B4C02200A278FE /* PBXContainerItemProxy */ = {
     1158                        isa = PBXContainerItemProxy;
     1159                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
     1160                        proxyType = 1;
     1161                        remoteGlobalIDString = BC8283C416B4BFA800A278FE;
     1162                        remoteInfo = Networking.Development;
    11411163                };
    11421164                BCA8D46715BCE0D6009DC1F1 /* PBXContainerItemProxy */ = {
     
    20962118                BC82839716B480F600A278FE /* XPCServiceBootstrapper.Development.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCServiceBootstrapper.Development.h; sourceTree = "<group>"; };
    20972119                BC82839816B48DC000A278FE /* WebContentServiceEntryPoint.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContentServiceEntryPoint.mm; sourceTree = "<group>"; };
     2120                BC8283A316B4BD9100A278FE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
     2121                BC8283A416B4BD9100A278FE /* NetworkServiceMain.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkServiceMain.mm; sourceTree = "<group>"; };
     2122                BC8283A616B4BD9100A278FE /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
     2123                BC8283A716B4BD9100A278FE /* NetworkServiceMain.Development.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkServiceMain.Development.mm; sourceTree = "<group>"; };
     2124                BC8283A816B4BD9100A278FE /* NetworkServiceEntryPoint.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = NetworkServiceEntryPoint.mm; sourceTree = "<group>"; };
     2125                BC8283AA16B4BEAD00A278FE /* NetworkService.Development.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = NetworkService.Development.xcconfig; sourceTree = "<group>"; };
     2126                BC8283AB16B4BEAD00A278FE /* NetworkService.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = NetworkService.xcconfig; sourceTree = "<group>"; };
     2127                BC8283B116B4BF7700A278FE /* com.apple.WebKit.Networking.xpc */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = com.apple.WebKit.Networking.xpc; sourceTree = BUILT_PRODUCTS_DIR; };
     2128                BC8283B216B4BF7700A278FE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
     2129                BC8283C516B4BFA800A278FE /* com.apple.WebKit.Networking.Development.xpc */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = com.apple.WebKit.Networking.Development.xpc; sourceTree = BUILT_PRODUCTS_DIR; };
    20982130                BC8452A51162C80900CAB9B5 /* DrawingArea.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawingArea.cpp; sourceTree = "<group>"; };
    20992131                BC8452A61162C80900CAB9B5 /* DrawingArea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingArea.h; sourceTree = "<group>"; };
     
    24572489                        runOnlyForDeploymentPostprocessing = 0;
    24582490                };
     2491                BC8283AE16B4BF7700A278FE /* Frameworks */ = {
     2492                        isa = PBXFrameworksBuildPhase;
     2493                        buildActionMask = 2147483647;
     2494                        files = (
     2495                                BC8283B316B4BF7700A278FE /* Foundation.framework in Frameworks */,
     2496                                BC8283DA16B4DB9300A278FE /* WebKit2.framework in Frameworks */,
     2497                        );
     2498                        runOnlyForDeploymentPostprocessing = 0;
     2499                };
     2500                BC8283C216B4BFA800A278FE /* Frameworks */ = {
     2501                        isa = PBXFrameworksBuildPhase;
     2502                        buildActionMask = 2147483647;
     2503                        files = (
     2504                                BC8283C616B4BFA800A278FE /* Foundation.framework in Frameworks */,
     2505                        );
     2506                        runOnlyForDeploymentPostprocessing = 0;
     2507                };
    24592508                BCAE9DE6160C097400A33217 /* Frameworks */ = {
    24602509                        isa = PBXFrameworksBuildPhase;
     
    24972546                                1A50DB1E110A3BDC000D3FE5 /* WebProcess.app */,
    24982547                                510031F61379CACB00C8DFE4 /* SecItemShim.dylib */,
     2548                                BC8283B116B4BF7700A278FE /* com.apple.WebKit.Networking.xpc */,
     2549                                BC8283C516B4BFA800A278FE /* com.apple.WebKit.Networking.Development.xpc */,
    24992550                        );
    25002551                        name = Products;
     
    26402691                                1A4F976C100E7B6600637A18 /* FeatureDefines.xcconfig */,
    26412692                                510CC8461613C7C600D03ED3 /* NetworkProcess.xcconfig */,
     2693                                BC8283AA16B4BEAD00A278FE /* NetworkService.Development.xcconfig */,
     2694                                BC8283AB16B4BEAD00A278FE /* NetworkService.xcconfig */,
    26422695                                BC122FA3132707F300F7EAC1 /* PluginProcess.xcconfig */,
    26432696                                E13A8A4B16287A1B00392929 /* SharedWorkerProcess.xcconfig */,
    26442697                                5183B3931379F85C00E8754E /* Shim.xcconfig */,
    26452698                                1A4F976E100E7B6600637A18 /* Version.xcconfig */,
     2699                                BCACC40F16B0B8A800B6E092 /* WebContentService.Development.xcconfig */,
    26462700                                BCACC40E16B0B8A800B6E092 /* WebContentService.xcconfig */,
    2647                                 BCACC40F16B0B8A800B6E092 /* WebContentService.Development.xcconfig */,
    26482701                                BCB86F4B116AAACD00CE20B7 /* WebKit2.xcconfig */,
    26492702                                5DAD7294116FF70B00EE5396 /* WebProcess.xcconfig */,
     
    40584111                        children = (
    40594112                                BC82837E16B45DA500A278FE /* LegacyProcess */,
     4113                                BC8283A116B4BD9100A278FE /* XPCService */,
    40604114                        );
    40614115                        name = EntryPoint;
     
    41104164                        name = LegacyProcess;
    41114165                        path = mac/LegacyProcess;
     4166                        sourceTree = "<group>";
     4167                };
     4168                BC8283A116B4BD9100A278FE /* XPCService */ = {
     4169                        isa = PBXGroup;
     4170                        children = (
     4171                                BC8283A216B4BD9100A278FE /* NetworkService */,
     4172                                BC8283A516B4BD9100A278FE /* NetworkService.Development */,
     4173                                BC8283A816B4BD9100A278FE /* NetworkServiceEntryPoint.mm */,
     4174                        );
     4175                        name = XPCService;
     4176                        path = mac/XPCService;
     4177                        sourceTree = "<group>";
     4178                };
     4179                BC8283A216B4BD9100A278FE /* NetworkService */ = {
     4180                        isa = PBXGroup;
     4181                        children = (
     4182                                BC8283A316B4BD9100A278FE /* Info.plist */,
     4183                                BC8283A416B4BD9100A278FE /* NetworkServiceMain.mm */,
     4184                        );
     4185                        path = NetworkService;
     4186                        sourceTree = "<group>";
     4187                };
     4188                BC8283A516B4BD9100A278FE /* NetworkService.Development */ = {
     4189                        isa = PBXGroup;
     4190                        children = (
     4191                                BC8283A616B4BD9100A278FE /* Info.plist */,
     4192                                BC8283A716B4BD9100A278FE /* NetworkServiceMain.Development.mm */,
     4193                        );
     4194                        path = NetworkService.Development;
    41124195                        sourceTree = "<group>";
    41134196                };
     
    45104593                        isa = PBXGroup;
    45114594                        children = (
     4595                                BC8283B216B4BF7700A278FE /* Foundation.framework */,
    45124596                                E13A8A31162879AC00392929 /* Other Frameworks */,
    45134597                                E13A8A2F162879AC00392929 /* Cocoa.framework */,
     
    52395323                        productType = "com.apple.product-type.bundle";
    52405324                };
     5325                BC8283B016B4BF7700A278FE /* Networking */ = {
     5326                        isa = PBXNativeTarget;
     5327                        buildConfigurationList = BC8283BD16B4BF7700A278FE /* Build configuration list for PBXNativeTarget "Networking" */;
     5328                        buildPhases = (
     5329                                BC8283AD16B4BF7700A278FE /* Sources */,
     5330                                BC8283AE16B4BF7700A278FE /* Frameworks */,
     5331                                BC8283AF16B4BF7700A278FE /* Resources */,
     5332                        );
     5333                        buildRules = (
     5334                        );
     5335                        dependencies = (
     5336                        );
     5337                        name = Networking;
     5338                        productName = Networking;
     5339                        productReference = BC8283B116B4BF7700A278FE /* com.apple.WebKit.Networking.xpc */;
     5340                        productType = "com.apple.product-type.bundle";
     5341                };
     5342                BC8283C416B4BFA800A278FE /* Networking.Development */ = {
     5343                        isa = PBXNativeTarget;
     5344                        buildConfigurationList = BC8283D016B4BFA800A278FE /* Build configuration list for PBXNativeTarget "Networking.Development" */;
     5345                        buildPhases = (
     5346                                BC8283C116B4BFA800A278FE /* Sources */,
     5347                                BC8283C216B4BFA800A278FE /* Frameworks */,
     5348                                BC8283C316B4BFA800A278FE /* Resources */,
     5349                        );
     5350                        buildRules = (
     5351                        );
     5352                        dependencies = (
     5353                        );
     5354                        name = Networking.Development;
     5355                        productName = Networking.Development;
     5356                        productReference = BC8283C516B4BFA800A278FE /* com.apple.WebKit.Networking.Development.xpc */;
     5357                        productType = "com.apple.product-type.bundle";
     5358                };
    52415359                BCAE9DE8160C097400A33217 /* WebContent.Development */ = {
    52425360                        isa = PBXNativeTarget;
     
    53295447                                BC3DE46515A91763008D26FC /* WebContent */,
    53305448                                BCAE9DE8160C097400A33217 /* WebContent.Development */,
     5449                                BC8283B016B4BF7700A278FE /* Networking */,
     5450                                BC8283C416B4BFA800A278FE /* Networking.Development */,
    53315451                        );
    53325452                };
     
    53695489                        runOnlyForDeploymentPostprocessing = 0;
    53705490                };
     5491                BC8283AF16B4BF7700A278FE /* Resources */ = {
     5492                        isa = PBXResourcesBuildPhase;
     5493                        buildActionMask = 2147483647;
     5494                        files = (
     5495                        );
     5496                        runOnlyForDeploymentPostprocessing = 0;
     5497                };
     5498                BC8283C316B4BFA800A278FE /* Resources */ = {
     5499                        isa = PBXResourcesBuildPhase;
     5500                        buildActionMask = 2147483647;
     5501                        files = (
     5502                        );
     5503                        runOnlyForDeploymentPostprocessing = 0;
     5504                };
    53715505                BCAE9DE7160C097400A33217 /* Resources */ = {
    53725506                        isa = PBXResourcesBuildPhase;
     
    55065640                                "$(BUILT_PRODUCTS_DIR)/com.apple.WebKit.WebContent.xpc",
    55075641                                "$(BUILT_PRODUCTS_DIR)/com.apple.WebKit.WebContent.Development.xpc",
     5642                                "$(BUILT_PRODUCTS_DIR)/com.apple.WebKit.Networking.xpc",
     5643                                "$(BUILT_PRODUCTS_DIR)/com.apple.WebKit.Networking.Development.xpc",
    55085644                        );
    55095645                        name = "Copy XPC services for engineering builds";
     
    55115647                                "$(BUILT_PRODUCTS_DIR)/${WRAPPER_NAME}/WebKit2.framework/Versions/A/XPCServices/com.apple.WebKit.WebContent.xpc",
    55125648                                "$(BUILT_PRODUCTS_DIR)/${WRAPPER_NAME}/WebKit2.framework/Versions/A/XPCServices/com.apple.WebKit.WebContent.Development.xpc",
     5649                                "$(BUILT_PRODUCTS_DIR)/${WRAPPER_NAME}/WebKit2.framework/Versions/A/XPCServices/com.apple.WebKit.Networking.xpc",
     5650                                "$(BUILT_PRODUCTS_DIR)/${WRAPPER_NAME}/WebKit2.framework/Versions/A/XPCServices/com.apple.WebKit.Networking.Development.xpc",
    55135651                        );
    55145652                        runOnlyForDeploymentPostprocessing = 0;
    55155653                        shellPath = /bin/sh;
    5516                         shellScript = "if [[ \"${CONFIGURATION}\" == \"Production\" ]]; then\n    exit\nfi\n\nXPC_SERVICES_PATH=\"${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/WebKit2.framework/Versions/A/XPCServices\"\nmkdir -p \"${XPC_SERVICES_PATH}\"\nditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.WebContent.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.WebContent.xpc\"\nditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.WebContent.Development.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.WebContent.Development.xpc\"\n";
     5654                        shellScript = "if [[ \"${CONFIGURATION}\" == \"Production\" ]]; then\n    exit\nfi\n\nXPC_SERVICES_PATH=\"${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/WebKit2.framework/Versions/A/XPCServices\"\nmkdir -p \"${XPC_SERVICES_PATH}\"\nditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.WebContent.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.WebContent.xpc\"\nditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.WebContent.Development.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.WebContent.Development.xpc\"\nditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.Networking.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.Networking.xpc\"\nditto \"${BUILT_PRODUCTS_DIR}/com.apple.WebKit.Networking.Development.xpc\" \"${XPC_SERVICES_PATH}/com.apple.WebKit.Networking.Development.xpc\"\n";
    55175655                };
    55185656                C0CE72841247E66800BC0EC4 /* Generate Derived Sources */ = {
     
    60986236                                BC82839516B4608300A278FE /* SharedWorkerProcessMain.mm in Sources */,
    60996237                                BC82839916B48DC000A278FE /* WebContentServiceEntryPoint.mm in Sources */,
     6238                                BC8283AC16B4BF3F00A278FE /* NetworkServiceEntryPoint.mm in Sources */,
    61006239                        );
    61016240                        runOnlyForDeploymentPostprocessing = 0;
     
    61066245                        files = (
    61076246                                BCACC44916B24D3200B6E092 /* WebContentServiceMain.mm in Sources */,
     6247                        );
     6248                        runOnlyForDeploymentPostprocessing = 0;
     6249                };
     6250                BC8283AD16B4BF7700A278FE /* Sources */ = {
     6251                        isa = PBXSourcesBuildPhase;
     6252                        buildActionMask = 2147483647;
     6253                        files = (
     6254                                BC8283D816B4DB2A00A278FE /* NetworkServiceMain.mm in Sources */,
     6255                        );
     6256                        runOnlyForDeploymentPostprocessing = 0;
     6257                };
     6258                BC8283C116B4BFA800A278FE /* Sources */ = {
     6259                        isa = PBXSourcesBuildPhase;
     6260                        buildActionMask = 2147483647;
     6261                        files = (
     6262                                BC8283D916B4DB2E00A278FE /* NetworkServiceMain.Development.mm in Sources */,
    61086263                        );
    61096264                        runOnlyForDeploymentPostprocessing = 0;
     
    61656320                        target = 510031EA1379CACB00C8DFE4 /* SecItemShim */;
    61666321                        targetProxy = 5183B38D1379F54600E8754E /* PBXContainerItemProxy */;
     6322                };
     6323                BC8283D516B4C01F00A278FE /* PBXTargetDependency */ = {
     6324                        isa = PBXTargetDependency;
     6325                        target = BC8283B016B4BF7700A278FE /* Networking */;
     6326                        targetProxy = BC8283D416B4C01F00A278FE /* PBXContainerItemProxy */;
     6327                };
     6328                BC8283D716B4C02200A278FE /* PBXTargetDependency */ = {
     6329                        isa = PBXTargetDependency;
     6330                        target = BC8283C416B4BFA800A278FE /* Networking.Development */;
     6331                        targetProxy = BC8283D616B4C02200A278FE /* PBXContainerItemProxy */;
    61676332                };
    61686333                BCA8D46815BCE0D6009DC1F1 /* PBXTargetDependency */ = {
     
    64176582                        name = Production;
    64186583                };
     6584                BC8283BE16B4BF7700A278FE /* Debug */ = {
     6585                        isa = XCBuildConfiguration;
     6586                        baseConfigurationReference = BC8283AB16B4BEAD00A278FE /* NetworkService.xcconfig */;
     6587                        buildSettings = {
     6588                        };
     6589                        name = Debug;
     6590                };
     6591                BC8283BF16B4BF7700A278FE /* Release */ = {
     6592                        isa = XCBuildConfiguration;
     6593                        baseConfigurationReference = BC8283AB16B4BEAD00A278FE /* NetworkService.xcconfig */;
     6594                        buildSettings = {
     6595                        };
     6596                        name = Release;
     6597                };
     6598                BC8283C016B4BF7700A278FE /* Production */ = {
     6599                        isa = XCBuildConfiguration;
     6600                        baseConfigurationReference = BC8283AB16B4BEAD00A278FE /* NetworkService.xcconfig */;
     6601                        buildSettings = {
     6602                        };
     6603                        name = Production;
     6604                };
     6605                BC8283D116B4BFA800A278FE /* Debug */ = {
     6606                        isa = XCBuildConfiguration;
     6607                        baseConfigurationReference = BC8283AA16B4BEAD00A278FE /* NetworkService.Development.xcconfig */;
     6608                        buildSettings = {
     6609                        };
     6610                        name = Debug;
     6611                };
     6612                BC8283D216B4BFA800A278FE /* Release */ = {
     6613                        isa = XCBuildConfiguration;
     6614                        baseConfigurationReference = BC8283AA16B4BEAD00A278FE /* NetworkService.Development.xcconfig */;
     6615                        buildSettings = {
     6616                        };
     6617                        name = Release;
     6618                };
     6619                BC8283D316B4BFA800A278FE /* Production */ = {
     6620                        isa = XCBuildConfiguration;
     6621                        baseConfigurationReference = BC8283AA16B4BEAD00A278FE /* NetworkService.Development.xcconfig */;
     6622                        buildSettings = {
     6623                        };
     6624                        name = Production;
     6625                };
    64196626                BCAE9DF7160C097500A33217 /* Debug */ = {
    64206627                        isa = XCBuildConfiguration;
     
    65926799                        defaultConfigurationName = Production;
    65936800                };
     6801                BC8283BD16B4BF7700A278FE /* Build configuration list for PBXNativeTarget "Networking" */ = {
     6802                        isa = XCConfigurationList;
     6803                        buildConfigurations = (
     6804                                BC8283BE16B4BF7700A278FE /* Debug */,
     6805                                BC8283BF16B4BF7700A278FE /* Release */,
     6806                                BC8283C016B4BF7700A278FE /* Production */,
     6807                        );
     6808                        defaultConfigurationIsVisible = 0;
     6809                };
     6810                BC8283D016B4BFA800A278FE /* Build configuration list for PBXNativeTarget "Networking.Development" */ = {
     6811                        isa = XCConfigurationList;
     6812                        buildConfigurations = (
     6813                                BC8283D116B4BFA800A278FE /* Debug */,
     6814                                BC8283D216B4BFA800A278FE /* Release */,
     6815                                BC8283D316B4BFA800A278FE /* Production */,
     6816                        );
     6817                        defaultConfigurationIsVisible = 0;
     6818                };
    65946819                BCAE9DF6160C097500A33217 /* Build configuration list for PBXNativeTarget "WebContent.Development" */ = {
    65956820                        isa = XCConfigurationList;
  • trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm

    r140919 r140924  
    4444void initializeWebContentService(const char* clientIdentifier, xpc_connection_t connection, mach_port_t serverPort, const char* uiProcessName)
    4545{
    46     // Remove the WebProcess shim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by
    47     // the WebProcess don't try to insert the shim and crash.
     46    // Remove the SecItemShim shim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by
     47    // the this process don't try to insert the shim and crash.
    4848    EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/SecItemShim.dylib");
    4949
Note: See TracChangeset for help on using the changeset viewer.