Changeset 140924 in webkit
- Timestamp:
- Jan 26, 2013 9:32:53 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 added
- 7 edited
- 7 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r140922 r140924 1 2013-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 1 48 2013-01-26 Sam Weinig <sam@webkit.org> 2 49 -
trunk/Source/WebKit2/Configurations/NetworkService.Development.xcconfig
r140921 r140924 1 // Copyright (C) 201 2, 2013 Apple Inc. All rights reserved.1 // Copyright (C) 2013 Apple Inc. All rights reserved. 2 2 // 3 3 // Redistribution and use in source and binary forms, with or without … … 24 24 #include "BaseXPCService.xcconfig" 25 25 26 PRODUCT_NAME = com.apple.WebKit. WebContent.Development;27 INFOPLIST_FILE = WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist;26 PRODUCT_NAME = com.apple.WebKit.Networking.Development; 27 INFOPLIST_FILE = NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist; -
trunk/Source/WebKit2/Configurations/NetworkService.xcconfig
r140921 r140924 24 24 #include "BaseXPCService.xcconfig" 25 25 26 PRODUCT_NAME = com.apple.WebKit. WebContent;27 INFOPLIST_FILE = WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist;26 PRODUCT_NAME = com.apple.WebKit.Networking; 27 INFOPLIST_FILE = NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist; -
trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist
r140921 r140924 10 10 <string>${EXECUTABLE_NAME}</string> 11 11 <key>CFBundleIdentifier</key> 12 <string>com.apple.WebKit. WebContent.Development</string>12 <string>com.apple.WebKit.Networking.Development</string> 13 13 <key>CFBundleInfoDictionaryVersion</key> 14 14 <string>6.0</string> … … 34 34 <string>Application</string> 35 35 <key>RunLoopType</key> 36 <string> _NSApplicationMain</string>36 <string>NSRunLoop</string> 37 37 <key>_MultipleInstances</key> 38 38 <true/> -
trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm
r140921 r140924 24 24 */ 25 25 26 #define WEBKIT_XPC_SERVICE_INITIALIZER initialize WebContentService26 #define WEBKIT_XPC_SERVICE_INITIALIZER initializeNetworkService 27 27 #include "XPCServiceBootstrapper.Development.h" 28 28 -
trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist
r140921 r140924 10 10 <string>${EXECUTABLE_NAME}</string> 11 11 <key>CFBundleIdentifier</key> 12 <string>com.apple.WebKit. WebContent</string>12 <string>com.apple.WebKit.Networking</string> 13 13 <key>CFBundleInfoDictionaryVersion</key> 14 14 <string>6.0</string> … … 34 34 <string>Application</string> 35 35 <key>RunLoopType</key> 36 <string> _NSApplicationMain</string>36 <string>NSRunLoop</string> 37 37 <key>_MultipleInstances</key> 38 38 <true/> -
trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm
r140921 r140924 24 24 */ 25 25 26 #define WEBKIT_XPC_SERVICE_INITIALIZER initialize WebContentService26 #define WEBKIT_XPC_SERVICE_INITIALIZER initializeNetworkService 27 27 #include "XPCServiceBootstrapper.h" 28 28 -
trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm
r140921 r140924 1 1 /* 2 * Copyright (C) 201 2Apple Inc. All rights reserved.2 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 31 31 #import "WKBase.h" 32 32 #import "WebKit2Initialize.h" 33 #import " WebProcess.h"33 #import "NetworkProcess.h" 34 34 #import <WebCore/RunLoop.h> 35 35 #import <stdio.h> … … 40 40 using namespace WebKit; 41 41 42 extern "C" WK_EXPORT void initialize WebContentService(const char* clientIdentifier, xpc_connection_t connection, mach_port_t serverPort, const char* uiProcessName);42 extern "C" WK_EXPORT void initializeNetworkService(const char* clientIdentifier, xpc_connection_t connection, mach_port_t serverPort, const char* uiProcessName); 43 43 44 void initialize WebContentService(const char* clientIdentifier, xpc_connection_t connection, mach_port_t serverPort, const char* uiProcessName)44 void initializeNetworkService(const char* clientIdentifier, xpc_connection_t connection, mach_port_t serverPort, const char* uiProcessName) 45 45 { 46 // Remove the WebProcessshim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by47 // 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. 48 48 EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/SecItemShim.dylib"); 49 49 50 RunLoop::setUseApplicationRunLoopOnMainRunLoop();51 50 InitializeWebKit2(); 52 51 … … 56 55 parameters.connectionIdentifier = CoreIPC::Connection::Identifier(serverPort, connection); 57 56 58 WebProcess::shared().initialize(parameters);57 NetworkProcess::shared().initialize(parameters); 59 58 } 60 59 -
trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
r140636 r140924 79 79 } 80 80 81 static 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 81 104 static void setUpTerminationNotificationHandler(pid_t pid) 82 105 { … … 143 166 144 167 #if HAVE(XPC) 145 static void connectTo WebProcessServiceForWebKitDevelopment(const ProcessLauncher::LaunchOptions&, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction, UUIDHolder* instanceUUID)168 static void connectToServiceForDevelopment(const ProcessLauncher::LaunchOptions& launchOptions, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction, UUIDHolder* instanceUUID) 146 169 { 147 170 // 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); 149 172 xpc_connection_set_instance(connection, instanceUUID->uuid); 150 173 … … 200 223 } 201 224 202 static void create WebProcessServiceForWebKitDevelopment(const ProcessLauncher::LaunchOptions& launchOptions, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction)225 static void createServiceForDevelopment(const ProcessLauncher::LaunchOptions& launchOptions, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction) 203 226 { 204 227 EnvironmentVariables environmentVariables; … … 206 229 207 230 // 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. 209 232 RefPtr<UUIDHolder> instanceUUID = UUIDHolder::create(); 210 233 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); 212 235 xpc_connection_set_instance(reExecConnection, instanceUUID->uuid); 213 236 … … 221 244 ASSERT(xpc_get_type(event) == XPC_TYPE_ERROR); 222 245 223 connectTo WebProcessServiceForWebKitDevelopment(launchOptions, that, didFinishLaunchingProcessFunction, instanceUUID.get());246 connectToServiceForDevelopment(launchOptions, that, didFinishLaunchingProcessFunction, instanceUUID.get()); 224 247 225 248 // Release the connection. … … 255 278 } 256 279 257 static void create WebProcessService(const ProcessLauncher::LaunchOptions& launchOptions, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction)280 static void createService(const ProcessLauncher::LaunchOptions& launchOptions, ProcessLauncher* that, DidFinishLaunchingProcessFunction didFinishLaunchingProcessFunction) 258 281 { 259 282 // 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. 261 284 RefPtr<UUIDHolder> instanceUUID = UUIDHolder::create(); 262 285 263 286 // 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); 265 288 xpc_connection_set_instance(connection, instanceUUID->uuid); 266 289 … … 378 401 379 402 NSString *processPath = nil; 380 switch (launchOptions.processType) {403 switch (launchOptions.processType) { 381 404 case ProcessLauncher::WebProcess: 382 405 processPath = [webKit2Bundle pathForAuxiliaryExecutable:@"WebProcess.app"]; … … 478 501 #if HAVE(XPC) 479 502 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); 487 507 return; 488 508 } -
trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.cpp
r140874 r140924 62 62 } 63 63 64 NetworkProcessProxy::~NetworkProcessProxy() 65 { 66 } 67 64 68 void NetworkProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) 65 69 { 66 70 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); 79 72 } 80 73 -
trunk/Source/WebKit2/UIProcess/Network/NetworkProcessProxy.h
r140874 r140924 68 68 69 69 virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&) OVERRIDE; 70 void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&); 70 71 71 72 void networkProcessCrashedOrFailedToLaunch(); -
trunk/Source/WebKit2/UIProcess/Network/mac/NetworkProcessProxyMac.mm
r137821 r140924 43 43 } 44 44 45 #if HAVE(XPC) 46 static 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 59 void 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 45 69 } // namespace WebKit 46 70 -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r140921 r140924 21 21 E13A8A4D16287A5B00392929 /* PBXTargetDependency */, 22 22 510CC8481613C85300D03ED3 /* PBXTargetDependency */, 23 BCA8D46815BCE0D6009DC1F1 /* PBXTargetDependency */, 23 24 BCAE9DFD160C0AB000A33217 /* PBXTargetDependency */, 24 BCA8D46815BCE0D6009DC1F1 /* PBXTargetDependency */, 25 BC8283D516B4C01F00A278FE /* PBXTargetDependency */, 26 BC8283D716B4C02200A278FE /* PBXTargetDependency */, 25 27 ); 26 28 name = All; … … 799 801 BC82839516B4608300A278FE /* SharedWorkerProcessMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC82839316B4607B00A278FE /* SharedWorkerProcessMain.mm */; }; 800 802 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 */; }; 801 809 BC82DF2215BDF42200FC2841 /* com.apple.WebProcess.sb in Resources */ = {isa = PBXBuildFile; fileRef = E1967E37150AB5E200C73169 /* com.apple.WebProcess.sb */; }; 802 810 BC8452A71162C80900CAB9B5 /* DrawingArea.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC8452A51162C80900CAB9B5 /* DrawingArea.cpp */; }; … … 1139 1147 remoteGlobalIDString = 510031EA1379CACB00C8DFE4; 1140 1148 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; 1141 1163 }; 1142 1164 BCA8D46715BCE0D6009DC1F1 /* PBXContainerItemProxy */ = { … … 2096 2118 BC82839716B480F600A278FE /* XPCServiceBootstrapper.Development.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCServiceBootstrapper.Development.h; sourceTree = "<group>"; }; 2097 2119 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; }; 2098 2130 BC8452A51162C80900CAB9B5 /* DrawingArea.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DrawingArea.cpp; sourceTree = "<group>"; }; 2099 2131 BC8452A61162C80900CAB9B5 /* DrawingArea.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DrawingArea.h; sourceTree = "<group>"; }; … … 2457 2489 runOnlyForDeploymentPostprocessing = 0; 2458 2490 }; 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 }; 2459 2508 BCAE9DE6160C097400A33217 /* Frameworks */ = { 2460 2509 isa = PBXFrameworksBuildPhase; … … 2497 2546 1A50DB1E110A3BDC000D3FE5 /* WebProcess.app */, 2498 2547 510031F61379CACB00C8DFE4 /* SecItemShim.dylib */, 2548 BC8283B116B4BF7700A278FE /* com.apple.WebKit.Networking.xpc */, 2549 BC8283C516B4BFA800A278FE /* com.apple.WebKit.Networking.Development.xpc */, 2499 2550 ); 2500 2551 name = Products; … … 2640 2691 1A4F976C100E7B6600637A18 /* FeatureDefines.xcconfig */, 2641 2692 510CC8461613C7C600D03ED3 /* NetworkProcess.xcconfig */, 2693 BC8283AA16B4BEAD00A278FE /* NetworkService.Development.xcconfig */, 2694 BC8283AB16B4BEAD00A278FE /* NetworkService.xcconfig */, 2642 2695 BC122FA3132707F300F7EAC1 /* PluginProcess.xcconfig */, 2643 2696 E13A8A4B16287A1B00392929 /* SharedWorkerProcess.xcconfig */, 2644 2697 5183B3931379F85C00E8754E /* Shim.xcconfig */, 2645 2698 1A4F976E100E7B6600637A18 /* Version.xcconfig */, 2699 BCACC40F16B0B8A800B6E092 /* WebContentService.Development.xcconfig */, 2646 2700 BCACC40E16B0B8A800B6E092 /* WebContentService.xcconfig */, 2647 BCACC40F16B0B8A800B6E092 /* WebContentService.Development.xcconfig */,2648 2701 BCB86F4B116AAACD00CE20B7 /* WebKit2.xcconfig */, 2649 2702 5DAD7294116FF70B00EE5396 /* WebProcess.xcconfig */, … … 4058 4111 children = ( 4059 4112 BC82837E16B45DA500A278FE /* LegacyProcess */, 4113 BC8283A116B4BD9100A278FE /* XPCService */, 4060 4114 ); 4061 4115 name = EntryPoint; … … 4110 4164 name = LegacyProcess; 4111 4165 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; 4112 4195 sourceTree = "<group>"; 4113 4196 }; … … 4510 4593 isa = PBXGroup; 4511 4594 children = ( 4595 BC8283B216B4BF7700A278FE /* Foundation.framework */, 4512 4596 E13A8A31162879AC00392929 /* Other Frameworks */, 4513 4597 E13A8A2F162879AC00392929 /* Cocoa.framework */, … … 5239 5323 productType = "com.apple.product-type.bundle"; 5240 5324 }; 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 }; 5241 5359 BCAE9DE8160C097400A33217 /* WebContent.Development */ = { 5242 5360 isa = PBXNativeTarget; … … 5329 5447 BC3DE46515A91763008D26FC /* WebContent */, 5330 5448 BCAE9DE8160C097400A33217 /* WebContent.Development */, 5449 BC8283B016B4BF7700A278FE /* Networking */, 5450 BC8283C416B4BFA800A278FE /* Networking.Development */, 5331 5451 ); 5332 5452 }; … … 5369 5489 runOnlyForDeploymentPostprocessing = 0; 5370 5490 }; 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 }; 5371 5505 BCAE9DE7160C097400A33217 /* Resources */ = { 5372 5506 isa = PBXResourcesBuildPhase; … … 5506 5640 "$(BUILT_PRODUCTS_DIR)/com.apple.WebKit.WebContent.xpc", 5507 5641 "$(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", 5508 5644 ); 5509 5645 name = "Copy XPC services for engineering builds"; … … 5511 5647 "$(BUILT_PRODUCTS_DIR)/${WRAPPER_NAME}/WebKit2.framework/Versions/A/XPCServices/com.apple.WebKit.WebContent.xpc", 5512 5648 "$(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", 5513 5651 ); 5514 5652 runOnlyForDeploymentPostprocessing = 0; 5515 5653 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"; 5517 5655 }; 5518 5656 C0CE72841247E66800BC0EC4 /* Generate Derived Sources */ = { … … 6098 6236 BC82839516B4608300A278FE /* SharedWorkerProcessMain.mm in Sources */, 6099 6237 BC82839916B48DC000A278FE /* WebContentServiceEntryPoint.mm in Sources */, 6238 BC8283AC16B4BF3F00A278FE /* NetworkServiceEntryPoint.mm in Sources */, 6100 6239 ); 6101 6240 runOnlyForDeploymentPostprocessing = 0; … … 6106 6245 files = ( 6107 6246 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 */, 6108 6263 ); 6109 6264 runOnlyForDeploymentPostprocessing = 0; … … 6165 6320 target = 510031EA1379CACB00C8DFE4 /* SecItemShim */; 6166 6321 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 */; 6167 6332 }; 6168 6333 BCA8D46815BCE0D6009DC1F1 /* PBXTargetDependency */ = { … … 6417 6582 name = Production; 6418 6583 }; 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 }; 6419 6626 BCAE9DF7160C097500A33217 /* Debug */ = { 6420 6627 isa = XCBuildConfiguration; … … 6592 6799 defaultConfigurationName = Production; 6593 6800 }; 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 }; 6594 6819 BCAE9DF6160C097500A33217 /* Build configuration list for PBXNativeTarget "WebContent.Development" */ = { 6595 6820 isa = XCConfigurationList; -
trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm
r140919 r140924 44 44 void initializeWebContentService(const char* clientIdentifier, xpc_connection_t connection, mach_port_t serverPort, const char* uiProcessName) 45 45 { 46 // Remove the WebProcessshim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by47 // 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. 48 48 EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/SecItemShim.dylib"); 49 49
Note: See TracChangeset
for help on using the changeset viewer.