Changeset 142428 in webkit
- Timestamp:
- Feb 10, 2013 9:16:52 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r142409 r142428 1 2013-02-10 Sam Weinig <sam@webkit.org> 2 3 Make the Plug-in XPCService build work even when building in Xcode 4 <rdar://problem/13011186> 5 https://bugs.webkit.org/show_bug.cgi?id=109392 6 7 Reviewed by Anders Carlsson. 8 9 * Configurations/DebugRelease.xcconfig: 10 Add a DEBUG_OR_RELEASE variable to test against. 11 * Configurations/PluginService.32.xcconfig: 12 * Configurations/PluginService.64.xcconfig: 13 In non-production builds, don't link against WebKit2, so that we don't get warnings about WebKit2.framework 14 not containing the right architectures. This is ok, as these services are not used in non-production builds. 15 16 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist: 17 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm: 18 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist: 19 * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm: 20 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32/Info.plist: 21 * PluginProcess/EntryPoint/mac/XPCService/PluginService.32/PluginService.32.Main.mm: 22 * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/Info.plist: 23 * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/PluginService.64.Main.mm: 24 * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist: 25 * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/PluginService.Development.Main.mm: 26 * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist: 27 * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm: 28 * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: 29 * WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm: 30 Switch off the the old idiom of defining a macro for the initializer function, and instead set 31 it in the Info.plist, so the XPCServiceBootstrapper can grab it. 32 33 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h: 34 (WebKit::XPCServiceEventHandler): 35 * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.h: 36 (WebKit::XPCServiceEventHandler): 37 Get the entry point from the bundle, rather than the macro. This is not only a bit less gross, 38 but also allows us to build without having linked against WebKit2.framework. 39 40 * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: 41 (WebKit::shouldUseXPC): 42 Re-enable using XPC for plug-ins. 43 44 * WebKit2.xcodeproj/project.pbxproj: 45 Update project. 46 1 47 2013-02-10 Anders Carlsson <andersca@apple.com> 2 48 -
trunk/Source/WebKit2/Configurations/DebugRelease.xcconfig
r132859 r142428 42 42 WEBKIT_SYSTEM_INTERFACE_LIBRARY_1080 = WebKitSystemInterfaceMountainLion; 43 43 WEBKIT_SYSTEM_INTERFACE_LIBRARY_1090 = WebKitSystemInterfaceMountainLion; 44 45 DEBUG_OR_RELEASE = YES; -
trunk/Source/WebKit2/Configurations/PluginService.32.xcconfig
r140929 r142428 27 27 PRODUCT_NAME = com.apple.WebKit.Plugin.32; 28 28 INFOPLIST_FILE = PluginProcess/EntryPoint/mac/XPCService/PluginService.32/Info.plist; 29 30 // Since this service is only used in production builds, in debug and release builds 31 // we don't link against WebKit2, to avoid linking errors due to not having a WebKit2 32 // of the right architecture. 33 34 FRAMEWORK_LDFLAGS = -framework Foundation $(FRAMEWORK_LDFLAGS_$(DEBUG_OR_RELEASE)); 35 FRAMEWORK_LDFLAGS_ = -framework WebKit2; 36 FRAMEWORK_LDFLAGS_NO = -framework WebKit2; 37 FRAMEWORK_LDFLAGS_YES = ; 38 39 OTHER_LDFLAGS = $(FRAMEWORK_LDFLAGS) $(OTHER_LDFLAGS); -
trunk/Source/WebKit2/Configurations/PluginService.64.xcconfig
r140929 r142428 27 27 PRODUCT_NAME = com.apple.WebKit.Plugin.64; 28 28 INFOPLIST_FILE = PluginProcess/EntryPoint/mac/XPCService/PluginService.64/Info.plist; 29 30 // Since this service is only used in production builds, in debug and release builds 31 // we don't link against WebKit2, to avoid linking errors due to not having a WebKit2 32 // of the right architecture. 33 34 FRAMEWORK_LDFLAGS = -framework Foundation $(FRAMEWORK_LDFLAGS_$(DEBUG_OR_RELEASE)); 35 FRAMEWORK_LDFLAGS_ = -framework WebKit2; 36 FRAMEWORK_LDFLAGS_NO = -framework WebKit2; 37 FRAMEWORK_LDFLAGS_YES = ; 38 39 OTHER_LDFLAGS = $(FRAMEWORK_LDFLAGS) $(OTHER_LDFLAGS); -
trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist
r140924 r142428 27 27 <key>NSPrincipalClass</key> 28 28 <string>NSApplication</string> 29 <key>WebKitEntryPoint</key> 30 <string>NetworkServiceInitializer</string> 29 31 <key>LSUIElement</key> 30 32 <true/> -
trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm
r141051 r142428 24 24 */ 25 25 26 #define WEBKIT_XPC_SERVICE_INITIALIZER NetworkServiceInitializer27 26 #include "XPCServiceBootstrapper.Development.h" 28 27 -
trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist
r140924 r142428 27 27 <key>NSPrincipalClass</key> 28 28 <string>NSApplication</string> 29 <key>WebKitEntryPoint</key> 30 <string>NetworkServiceInitializer</string> 29 31 <key>LSUIElement</key> 30 32 <true/> -
trunk/Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm
r141051 r142428 24 24 */ 25 25 26 #define WEBKIT_XPC_SERVICE_INITIALIZER NetworkServiceInitializer27 26 #include "XPCServiceBootstrapper.h" 28 27 -
trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32/Info.plist
r140929 r142428 27 27 <key>NSPrincipalClass</key> 28 28 <string>NSApplication</string> 29 <key>WebKitEntryPoint</key> 30 <string>PluginServiceInitializer</string> 29 31 <key>LSUIElement</key> 30 32 <true/> -
trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32/PluginService.32.Main.mm
r141051 r142428 26 26 #if defined(__i386__) 27 27 28 #define WEBKIT_XPC_SERVICE_INITIALIZER PluginServiceInitializer29 28 #include "XPCServiceBootstrapper.h" 30 29 -
trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.64/Info.plist
r140929 r142428 27 27 <key>NSPrincipalClass</key> 28 28 <string>NSApplication</string> 29 <key>WebKitEntryPoint</key> 30 <string>PluginServiceInitializer</string> 29 31 <key>LSUIElement</key> 30 32 <true/> -
trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.64/PluginService.64.Main.mm
r141051 r142428 24 24 */ 25 25 26 #define WEBKIT_XPC_SERVICE_INITIALIZER PluginServiceInitializer27 26 #include "XPCServiceBootstrapper.h" 28 27 -
trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist
r140929 r142428 27 27 <key>NSPrincipalClass</key> 28 28 <string>NSApplication</string> 29 <key>WebKitEntryPoint</key> 30 <string>PluginServiceInitializer</string> 29 31 <key>LSUIElement</key> 30 32 <true/> -
trunk/Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/PluginService.Development.Main.mm
r141051 r142428 24 24 */ 25 25 26 #define WEBKIT_XPC_SERVICE_INITIALIZER PluginServiceInitializer27 26 #include "XPCServiceBootstrapper.Development.h" 28 27 -
trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h
r141051 r142428 27 27 #define XPCServiceBootstrapper_Development_h 28 28 29 #if !defined(WEBKIT_XPC_SERVICE_INITIALIZER)30 #error WEBKIT_XPC_SERVICE_INITIALIZER must be defined.31 #endif32 33 29 #import <crt_externs.h> 34 30 #import <dlfcn.h> … … 38 34 #import <stdlib.h> 39 35 #import <xpc/xpc.h> 40 41 #define STRINGIZE(exp) #exp42 #define STRINGIZE_VALUE_OF(exp) STRINGIZE(exp)43 36 44 37 namespace WebKit { … … 115 108 } 116 109 110 CFBundleRef webKit2Bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebKit2")); 111 CFStringRef entryPointFunctionName = (CFStringRef)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), CFSTR("WebKitEntryPoint")); 112 117 113 typedef void (*InitializerFunction)(xpc_connection_t, xpc_object_t); 118 InitializerFunction initializerFunctionPtr = reinterpret_cast<InitializerFunction>( dlsym(frameworkLibrary, STRINGIZE_VALUE_OF(WEBKIT_XPC_SERVICE_INITIALIZER)));114 InitializerFunction initializerFunctionPtr = reinterpret_cast<InitializerFunction>(CFBundleGetFunctionPointerForName(webKit2Bundle, entryPointFunctionName)); 119 115 if (!initializerFunctionPtr) { 120 NSLog(@"Unable to find entry point in WebKit2.framework loaded from path: %s (Error: %s)", xpc_dictionary_get_string(event, "framework-executable-path"), dlerror());116 NSLog(@"Unable to find entry point in WebKit2.framework with name: %@", (NSString *)entryPointFunctionName); 121 117 exit(EXIT_FAILURE); 122 118 } -
trunk/Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.h
r141051 r142428 27 27 #define XPCServiceBootstrapper_h 28 28 29 #if !defined(WEBKIT_XPC_SERVICE_INITIALIZER) 30 #error WEBKIT_XPC_SERVICE_INITIALIZER must be defined. 31 #endif 32 29 #import <CoreFoundation/CoreFoundation.h> 33 30 #import <xpc/xpc.h> 34 35 // Forward declare the specified initializer.36 extern "C" void WEBKIT_XPC_SERVICE_INITIALIZER(xpc_connection_t, xpc_object_t);37 31 38 32 namespace WebKit { … … 52 46 53 47 if (!strcmp(xpc_dictionary_get_string(event, "message-name"), "bootstrap")) { 48 CFBundleRef webKit2Bundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebKit2")); 49 CFStringRef entryPointFunctionName = (CFStringRef)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), CFSTR("WebKitEntryPoint")); 50 51 typedef void (*InitializerFunction)(xpc_connection_t, xpc_object_t); 52 InitializerFunction initializerFunctionPtr = reinterpret_cast<InitializerFunction>(CFBundleGetFunctionPointerForName(webKit2Bundle, entryPointFunctionName)); 53 if (!initializerFunctionPtr) { 54 NSLog(@"Unable to find entry point in WebKit2.framework with name: %@", (NSString *)entryPointFunctionName); 55 exit(EXIT_FAILURE); 56 } 57 54 58 xpc_object_t reply = xpc_dictionary_create_reply(event); 55 59 xpc_dictionary_set_string(reply, "message-name", "process-finished-launching"); … … 57 61 xpc_release(reply); 58 62 59 WEBKIT_XPC_SERVICE_INITIALIZER(peer, event);63 initializerFunctionPtr(peer, event); 60 64 } 61 65 } -
trunk/Source/WebKit2/UIProcess/Plugins/mac/PluginProcessProxyMac.mm
r141167 r142428 125 125 126 126 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 127 return false;127 return true; 128 128 #else 129 129 return false; -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r141760 r142428 25 25 BC8283D516B4C01F00A278FE /* PBXTargetDependency */, 26 26 BC8283D716B4C02200A278FE /* PBXTargetDependency */, 27 BCCDE2D616C88DAA00D90310 /* PBXTargetDependency */, 27 28 BC82844616B4FF6600A278FE /* PBXTargetDependency */, 28 29 BC82844816B4FF6F00A278FE /* PBXTargetDependency */, … … 814 815 BC8283D916B4DB2E00A278FE /* NetworkServiceMain.Development.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8283A716B4BD9100A278FE /* NetworkServiceMain.Development.mm */; }; 815 816 BC8283DA16B4DB9300A278FE /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* WebKit2.framework */; }; 816 BC8283FA16B4FDDE00A278FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC8283B216B4BF7700A278FE /* Foundation.framework */; };817 BC82842016B4FDF600A278FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC8283B216B4BF7700A278FE /* Foundation.framework */; };818 817 BC82843316B4FE1400A278FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BC8283B216B4BF7700A278FE /* Foundation.framework */; }; 819 818 BC82844916B5004200A278FE /* PluginService.32.Main.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8283E516B4F8E200A278FE /* PluginService.32.Main.mm */; }; 820 819 BC82844B16B5004D00A278FE /* PluginService.64.Main.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8283EB16B4F8E200A278FE /* PluginService.64.Main.mm */; }; 821 820 BC82844D16B5081C00A278FE /* PluginServiceEntryPoint.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC8283EF16B4F8E200A278FE /* PluginServiceEntryPoint.mm */; }; 822 BC82844E16B5089400A278FE /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* WebKit2.framework */; };823 BC82844F16B5089800A278FE /* WebKit2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* WebKit2.framework */; };824 821 BC8452A71162C80900CAB9B5 /* DrawingArea.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC8452A51162C80900CAB9B5 /* DrawingArea.cpp */; }; 825 822 BC8452A81162C80900CAB9B5 /* DrawingArea.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8452A61162C80900CAB9B5 /* DrawingArea.h */; }; … … 1212 1209 remoteInfo = WebProcessServiceForWebKitDevelopment; 1213 1210 }; 1211 BCCDE2D516C88DAA00D90310 /* PBXContainerItemProxy */ = { 1212 isa = PBXContainerItemProxy; 1213 containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; 1214 proxyType = 1; 1215 remoteGlobalIDString = BC8283F816B4FDDE00A278FE; 1216 remoteInfo = Plugin.32; 1217 }; 1214 1218 BCDE093513272496001259FB /* PBXContainerItemProxy */ = { 1215 1219 isa = PBXContainerItemProxy; … … 1521 1525 1AB16AEC164B41E400290D62 /* RemoteGraphicsLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteGraphicsLayer.h; sourceTree = "<group>"; }; 1522 1526 1AB31A9316BC65AB00F6DBC9 /* StorageManager.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = StorageManager.messages.in; sourceTree = "<group>"; }; 1523 1AB31A9416BC688100F6DBC9 /* StorageManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StorageManagerMessageReceiver.cpp;path = StorageManagerMessageReceiver.cpp; sourceTree = "<group>"; };1524 1AB31A9516BC688100F6DBC9 /* StorageManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StorageManagerMessages.h;path = StorageManagerMessages.h; sourceTree = "<group>"; };1527 1AB31A9416BC688100F6DBC9 /* StorageManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StorageManagerMessageReceiver.cpp; sourceTree = "<group>"; }; 1528 1AB31A9516BC688100F6DBC9 /* StorageManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageManagerMessages.h; sourceTree = "<group>"; }; 1525 1529 1AB7D4C81288AAA700CFD08C /* DownloadProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadProxy.h; sourceTree = "<group>"; }; 1526 1530 1AB7D4C91288AAA700CFD08C /* DownloadProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DownloadProxy.cpp; sourceTree = "<group>"; }; … … 2574 2578 buildActionMask = 2147483647; 2575 2579 files = ( 2576 BC8283FA16B4FDDE00A278FE /* Foundation.framework in Frameworks */,2577 BC82844E16B5089400A278FE /* WebKit2.framework in Frameworks */,2578 2580 ); 2579 2581 runOnlyForDeploymentPostprocessing = 0; … … 2583 2585 buildActionMask = 2147483647; 2584 2586 files = ( 2585 BC82842016B4FDF600A278FE /* Foundation.framework in Frameworks */,2586 BC82844F16B5089800A278FE /* WebKit2.framework in Frameworks */,2587 2587 ); 2588 2588 runOnlyForDeploymentPostprocessing = 0; … … 6627 6627 targetProxy = BCAE9DFC160C0AB000A33217 /* PBXContainerItemProxy */; 6628 6628 }; 6629 BCCDE2D616C88DAA00D90310 /* PBXTargetDependency */ = { 6630 isa = PBXTargetDependency; 6631 target = BC8283F816B4FDDE00A278FE /* Plugin.32 */; 6632 targetProxy = BCCDE2D516C88DAA00D90310 /* PBXContainerItemProxy */; 6633 }; 6629 6634 BCDE093413272496001259FB /* PBXTargetDependency */ = { 6630 6635 isa = PBXTargetDependency; -
trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist
r140636 r142428 27 27 <key>NSPrincipalClass</key> 28 28 <string>NSApplication</string> 29 <key>WebKitEntryPoint</key> 30 <string>WebContentServiceInitializer</string> 29 31 <key>LSUIElement</key> 30 32 <true/> -
trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm
r141051 r142428 24 24 */ 25 25 26 #define WEBKIT_XPC_SERVICE_INITIALIZER WebContentServiceInitializer27 26 #include "XPCServiceBootstrapper.Development.h" 28 27 -
trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist
r140636 r142428 27 27 <key>NSPrincipalClass</key> 28 28 <string>NSApplication</string> 29 <key>WebKitEntryPoint</key> 30 <string>WebContentServiceInitializer</string> 29 31 <key>LSUIElement</key> 30 32 <true/> -
trunk/Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm
r141051 r142428 24 24 */ 25 25 26 #define WEBKIT_XPC_SERVICE_INITIALIZER WebContentServiceInitializer27 26 #include "XPCServiceBootstrapper.h" 28 27
Note: See TracChangeset
for help on using the changeset viewer.