WebKit Bugzilla
Attachment 360868 Details for
Bug 194129
: Move XPCService entry points from mac directory to new Cocoa directory
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194129-20190201094807.patch (text/plain), 68.64 KB, created by
Alex Christensen
on 2019-02-01 09:48:08 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-02-01 09:48:08 PST
Size:
68.64 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 240857) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,27 @@ >+2019-02-01 Alex Christensen <achristensen@webkit.org> >+ >+ Move XPCService entry points from mac directory to new Cocoa directory >+ https://bugs.webkit.org/show_bug.cgi?id=194129 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Configurations/NetworkService.xcconfig: >+ * Configurations/PluginService.64.xcconfig: >+ * Configurations/WebContentService.xcconfig: >+ * NetworkProcess/EntryPoint/Cocoa: Copied from Source/WebKit/NetworkProcess/EntryPoint/mac. >+ * NetworkProcess/EntryPoint/mac: Removed. >+ * PluginProcess/EntryPoint/Cocoa: Copied from Source/WebKit/PluginProcess/EntryPoint/mac. >+ * PluginProcess/EntryPoint/mac: Removed. >+ * Shared/EntryPointUtilities/Cocoa: Copied from Source/WebKit/Shared/EntryPointUtilities/mac. >+ * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h: >+ * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm: >+ * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: >+ * Shared/EntryPointUtilities/mac: Removed. >+ * SourcesCocoa.txt: >+ * WebKit.xcodeproj/project.pbxproj: >+ * WebProcess/EntryPoint/Cocoa: Copied from Source/WebKit/WebProcess/EntryPoint/mac. >+ * WebProcess/EntryPoint/mac: Removed. >+ > 2019-02-01 Per Arne Vollan <pvollan@apple.com> > > [macOS] Revert parts of r240811, since it causes kernel panics. >Index: Source/WebKit/SourcesCocoa.txt >=================================================================== >--- Source/WebKit/SourcesCocoa.txt (revision 240850) >+++ Source/WebKit/SourcesCocoa.txt (working copy) >@@ -39,7 +39,7 @@ NetworkProcess/CustomProtocols/LegacyCus > > NetworkProcess/Downloads/cocoa/DownloadCocoa.mm > >-NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm >+NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm > > NetworkProcess/ios/NetworkProcessIOS.mm > >@@ -81,7 +81,7 @@ Platform/mac/StringUtilities.mm > > Platform/unix/EnvironmentUtilities.cpp > >-PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm @no-unify >+PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm @no-unify > > PluginProcess/mac/PluginControllerProxyMac.mm @no-unify > PluginProcess/mac/PluginProcessMac.mm @no-unify >@@ -147,8 +147,8 @@ Shared/Cocoa/WKNSURLExtras.mm > Shared/Cocoa/WKNSURLRequest.mm > Shared/Cocoa/WKObject.mm > >-Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm >-Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm >+Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm >+Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm > > Shared/ios/AuxiliaryProcessIOS.mm > Shared/ios/InteractionInformationAtPosition.mm >@@ -493,7 +493,7 @@ WebProcess/cocoa/UserMediaCaptureManager > WebProcess/cocoa/VideoFullscreenManager.mm > WebProcess/cocoa/WebProcessCocoa.mm > >-WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm >+WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm > > WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp > >Index: Source/WebKit/Configurations/NetworkService.xcconfig >=================================================================== >--- Source/WebKit/Configurations/NetworkService.xcconfig (revision 240850) >+++ Source/WebKit/Configurations/NetworkService.xcconfig (working copy) >@@ -37,8 +37,8 @@ OTHER_CODE_SIGN_FLAGS = $(WK_LIBRARY_VAL > > PRODUCT_NAME = com.apple.WebKit.Networking; > PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_NAME); >-INFOPLIST_FILE[sdk=iphone*] = NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist; >-INFOPLIST_FILE[sdk=macosx*] = NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist; >+INFOPLIST_FILE[sdk=iphone*] = NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist; >+INFOPLIST_FILE[sdk=macosx*] = NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-OSX.plist; > > OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH) $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS); > OTHER_LDFLAGS[sdk=macosx*] = $(inherited) $(BUILT_PRODUCTS_DIR)/SecItemShim.dylib; >Index: Source/WebKit/Configurations/PluginService.64.xcconfig >=================================================================== >--- Source/WebKit/Configurations/PluginService.64.xcconfig (revision 240850) >+++ Source/WebKit/Configurations/PluginService.64.xcconfig (working copy) >@@ -27,7 +27,7 @@ VALID_ARCHS_macosx_NO = x86_64; > > PRODUCT_NAME = com.apple.WebKit.Plugin.64; > PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_NAME); >-INFOPLIST_FILE = PluginProcess/EntryPoint/mac/XPCService/PluginService.64.Info.plist; >+INFOPLIST_FILE = PluginProcess/EntryPoint/Cocoa/XPCService/PluginService.64.Info.plist; > > WK_APPKIT_LDFLAGS = $(WK_APPKIT_LDFLAGS_$(WK_PLATFORM_NAME)); > WK_APPKIT_LDFLAGS_macosx = -framework AppKit; >Index: Source/WebKit/Configurations/WebContentService.xcconfig >=================================================================== >--- Source/WebKit/Configurations/WebContentService.xcconfig (revision 240850) >+++ Source/WebKit/Configurations/WebContentService.xcconfig (working copy) >@@ -41,8 +41,8 @@ PRODUCT_NAME_Normal = com.apple.WebKit.W > PRODUCT_NAME_Development = com.apple.WebKit.WebContent.Development; > > PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_NAME); >-INFOPLIST_FILE[sdk=iphone*] = WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist; >-INFOPLIST_FILE[sdk=macosx*] = WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist; >+INFOPLIST_FILE[sdk=iphone*] = WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist; >+INFOPLIST_FILE[sdk=macosx*] = WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-OSX.plist; > > WK_APPKIT_LDFLAGS = $(WK_APPKIT_LDFLAGS_$(WK_PLATFORM_NAME)); > WK_APPKIT_LDFLAGS_macosx = -framework AppKit; >Index: Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist >=================================================================== >--- Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist (revision 240850) >+++ Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist (nonexistent) >@@ -1,45 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >-<plist version="1.0"> >-<dict> >- <key>CFBundleGetInfoString</key> >- <string>${BUNDLE_VERSION}, Copyright 2003-2019 Apple Inc.</string> >- <key>CFBundleDevelopmentRegion</key> >- <string>English</string> >- <key>CFBundleExecutable</key> >- <string>${EXECUTABLE_NAME}</string> >- <key>CFBundleIdentifier</key> >- <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> >- <key>CFBundleInfoDictionaryVersion</key> >- <string>6.0</string> >- <key>CFBundleName</key> >- <string>${PRODUCT_NAME}</string> >- <key>CFBundlePackageType</key> >- <string>XPC!</string> >- <key>CFBundleShortVersionString</key> >- <string>${SHORT_VERSION_STRING}</string> >- <key>CFBundleSignature</key> >- <string>????</string> >- <key>CFBundleVersion</key> >- <string>${BUNDLE_VERSION}</string> >- <key>LSFileQuarantineEnabled</key> >- <true/> >- <key>NSPrincipalClass</key> >- <string>NSApplication</string> >- <key>WebKitEntryPoint</key> >- <string>NetworkServiceInitializer</string> >- <key>LSUIElement</key> >- <true/> >- <key>XPCService</key> >- <dict> >- <key>ServiceType</key> >- <string>Application</string> >- <key>JoinExistingSession</key> >- <true/> >- <key>RunLoopType</key> >- <string>NSRunLoop</string> >- <key>_MultipleInstances</key> >- <true/> >- </dict> >-</dict> >-</plist> >Index: Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist >=================================================================== >--- Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist (revision 240850) >+++ Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist (nonexistent) >@@ -1,43 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >-<plist version="1.0"> >-<dict> >- <key>CFBundleGetInfoString</key> >- <string>${BUNDLE_VERSION}, Copyright 2003-2019 Apple Inc.</string> >- <key>CFBundleDevelopmentRegion</key> >- <string>English</string> >- <key>CFBundleExecutable</key> >- <string>${EXECUTABLE_NAME}</string> >- <key>CFBundleIdentifier</key> >- <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> >- <key>CFBundleInfoDictionaryVersion</key> >- <string>6.0</string> >- <key>CFBundleName</key> >- <string>${PRODUCT_NAME}</string> >- <key>CFBundlePackageType</key> >- <string>XPC!</string> >- <key>CFBundleShortVersionString</key> >- <string>${SHORT_VERSION_STRING}</string> >- <key>CFBundleSignature</key> >- <string>????</string> >- <key>CFBundleVersion</key> >- <string>${BUNDLE_VERSION}</string> >- <key>LSFileQuarantineEnabled</key> >- <true/> >- <key>NSPrincipalClass</key> >- <string>NSApplication</string> >- <key>WebKitEntryPoint</key> >- <string>NetworkServiceInitializer</string> >- <key>LSUIElement</key> >- <true/> >- <key>XPCService</key> >- <dict> >- <key>ServiceType</key> >- <string>Application</string> >- <key>RunLoopType</key> >- <string>NSRunLoop</string> >- <key>_MultipleInstances</key> >- <true/> >- </dict> >-</dict> >-</plist> >Index: Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm >=================================================================== >--- Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm (revision 240850) >+++ Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm (nonexistent) >@@ -1,61 +0,0 @@ >-/* >- * Copyright (C) 2013 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#import "config.h" >- >-#import "EnvironmentUtilities.h" >-#import "NetworkProcess.h" >-#import "WKBase.h" >-#import "XPCServiceEntryPoint.h" >- >-namespace WebKit { >- >-class NetworkServiceInitializerDelegate : public XPCServiceInitializerDelegate { >-public: >- NetworkServiceInitializerDelegate(OSObjectPtr<xpc_connection_t> connection, xpc_object_t initializerMessage) >- : XPCServiceInitializerDelegate(WTFMove(connection), initializerMessage) >- { >- } >-}; >- >-template<> >-void initializeAuxiliaryProcess<NetworkProcess>(AuxiliaryProcessInitializationParameters&& parameters) >-{ >- static NeverDestroyed<NetworkProcess> networkProcess(WTFMove(parameters)); >-} >- >-} // namespace WebKit >- >-using namespace WebKit; >- >-extern "C" WK_EXPORT void NetworkServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage); >- >-void NetworkServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage) >-{ >- // Remove the SecItemShim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by >- // the this process don't try to insert the shim and crash. >- EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/SecItemShim.dylib"); >- XPCServiceInitializer<NetworkProcess, NetworkServiceInitializerDelegate>(adoptOSObject(connection), initializerMessage, priorityBoostMessage); >-} >Index: Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm >=================================================================== >--- Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm (revision 240850) (from Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:240850) >+++ Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm (working copy) >@@ -0,0 +1,61 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import "config.h" >+ >+#import "EnvironmentUtilities.h" >+#import "NetworkProcess.h" >+#import "WKBase.h" >+#import "XPCServiceEntryPoint.h" >+ >+namespace WebKit { >+ >+class NetworkServiceInitializerDelegate : public XPCServiceInitializerDelegate { >+public: >+ NetworkServiceInitializerDelegate(OSObjectPtr<xpc_connection_t> connection, xpc_object_t initializerMessage) >+ : XPCServiceInitializerDelegate(WTFMove(connection), initializerMessage) >+ { >+ } >+}; >+ >+template<> >+void initializeAuxiliaryProcess<NetworkProcess>(AuxiliaryProcessInitializationParameters&& parameters) >+{ >+ static NeverDestroyed<NetworkProcess> networkProcess(WTFMove(parameters)); >+} >+ >+} // namespace WebKit >+ >+using namespace WebKit; >+ >+extern "C" WK_EXPORT void NetworkServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage); >+ >+void NetworkServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage) >+{ >+ // Remove the SecItemShim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by >+ // the this process don't try to insert the shim and crash. >+ EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/SecItemShim.dylib"); >+ XPCServiceInitializer<NetworkProcess, NetworkServiceInitializerDelegate>(adoptOSObject(connection), initializerMessage, priorityBoostMessage); >+} >Index: Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-OSX.plist >=================================================================== >--- Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-OSX.plist (revision 240850) (from Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:240850) >+++ Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-OSX.plist (working copy) >@@ -0,0 +1,45 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >+<plist version="1.0"> >+<dict> >+ <key>CFBundleGetInfoString</key> >+ <string>${BUNDLE_VERSION}, Copyright 2003-2019 Apple Inc.</string> >+ <key>CFBundleDevelopmentRegion</key> >+ <string>English</string> >+ <key>CFBundleExecutable</key> >+ <string>${EXECUTABLE_NAME}</string> >+ <key>CFBundleIdentifier</key> >+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> >+ <key>CFBundleInfoDictionaryVersion</key> >+ <string>6.0</string> >+ <key>CFBundleName</key> >+ <string>${PRODUCT_NAME}</string> >+ <key>CFBundlePackageType</key> >+ <string>XPC!</string> >+ <key>CFBundleShortVersionString</key> >+ <string>${SHORT_VERSION_STRING}</string> >+ <key>CFBundleSignature</key> >+ <string>????</string> >+ <key>CFBundleVersion</key> >+ <string>${BUNDLE_VERSION}</string> >+ <key>LSFileQuarantineEnabled</key> >+ <true/> >+ <key>NSPrincipalClass</key> >+ <string>NSApplication</string> >+ <key>WebKitEntryPoint</key> >+ <string>NetworkServiceInitializer</string> >+ <key>LSUIElement</key> >+ <true/> >+ <key>XPCService</key> >+ <dict> >+ <key>ServiceType</key> >+ <string>Application</string> >+ <key>JoinExistingSession</key> >+ <true/> >+ <key>RunLoopType</key> >+ <string>NSRunLoop</string> >+ <key>_MultipleInstances</key> >+ <true/> >+ </dict> >+</dict> >+</plist> >Index: Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist >=================================================================== >--- Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist (revision 240850) (from Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-iOS.plist:240850) >+++ Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkService/Info-iOS.plist (working copy) >@@ -0,0 +1,43 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >+<plist version="1.0"> >+<dict> >+ <key>CFBundleGetInfoString</key> >+ <string>${BUNDLE_VERSION}, Copyright 2003-2019 Apple Inc.</string> >+ <key>CFBundleDevelopmentRegion</key> >+ <string>English</string> >+ <key>CFBundleExecutable</key> >+ <string>${EXECUTABLE_NAME}</string> >+ <key>CFBundleIdentifier</key> >+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> >+ <key>CFBundleInfoDictionaryVersion</key> >+ <string>6.0</string> >+ <key>CFBundleName</key> >+ <string>${PRODUCT_NAME}</string> >+ <key>CFBundlePackageType</key> >+ <string>XPC!</string> >+ <key>CFBundleShortVersionString</key> >+ <string>${SHORT_VERSION_STRING}</string> >+ <key>CFBundleSignature</key> >+ <string>????</string> >+ <key>CFBundleVersion</key> >+ <string>${BUNDLE_VERSION}</string> >+ <key>LSFileQuarantineEnabled</key> >+ <true/> >+ <key>NSPrincipalClass</key> >+ <string>NSApplication</string> >+ <key>WebKitEntryPoint</key> >+ <string>NetworkServiceInitializer</string> >+ <key>LSUIElement</key> >+ <true/> >+ <key>XPCService</key> >+ <dict> >+ <key>ServiceType</key> >+ <string>Application</string> >+ <key>RunLoopType</key> >+ <string>NSRunLoop</string> >+ <key>_MultipleInstances</key> >+ <true/> >+ </dict> >+</dict> >+</plist> >Index: Source/WebKit/PluginProcess/EntryPoint/mac/XPCService/PluginService.64.Info.plist >=================================================================== >--- Source/WebKit/PluginProcess/EntryPoint/mac/XPCService/PluginService.64.Info.plist (revision 240850) >+++ Source/WebKit/PluginProcess/EntryPoint/mac/XPCService/PluginService.64.Info.plist (nonexistent) >@@ -1,58 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >-<plist version="1.0"> >-<dict> >- <key>CFBundleGetInfoString</key> >- <string>${BUNDLE_VERSION}, Copyright 2003-2019 Apple Inc.</string> >- <key>CFBundleDevelopmentRegion</key> >- <string>English</string> >- <key>CFBundleExecutable</key> >- <string>${EXECUTABLE_NAME}</string> >- <key>CFBundleIdentifier</key> >- <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> >- <key>CFBundleInfoDictionaryVersion</key> >- <string>6.0</string> >- <key>CFBundleName</key> >- <string>${PRODUCT_NAME}</string> >- <key>CFBundlePackageType</key> >- <string>XPC!</string> >- <key>CFBundleShortVersionString</key> >- <string>${SHORT_VERSION_STRING}</string> >- <key>CFBundleSignature</key> >- <string>????</string> >- <key>CFBundleVersion</key> >- <string>${BUNDLE_VERSION}</string> >- <key>LSFileQuarantineEnabled</key> >- <false/> >- <key>NSPrincipalClass</key> >- <string>NSApplication</string> >- <key>WebKitEntryPoint</key> >- <string>PluginServiceInitializer</string> >- <key>LSUIElement</key> >- <true/> >- <key>NSSupportsAutomaticGraphicsSwitching</key> >- <true/> >- <key>NSSupportsAppNap</key> >- <true/> >- <key>XPCService</key> >- <dict> >- <key>ServiceType</key> >- <string>Application</string> >- <key>RunLoopType</key> >- <string>_NSApplicationMain</string> >- <key>JoinExistingSession</key> >- <true/> >- <key>_MultipleInstances</key> >- <true/> >- <key>_AbandonCoalition</key> >- <true/> >- <key>_HighBitsASLR</key> >- <true/> >- <key>EnvironmentVariables</key> >- <dict> >- <key>NSStringDisableTagged</key> >- <string>YES</string> >- </dict> >- </dict> >-</dict> >-</plist> >Index: Source/WebKit/PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm >=================================================================== >--- Source/WebKit/PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm (revision 240850) >+++ Source/WebKit/PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm (nonexistent) >@@ -1,84 +0,0 @@ >-/* >- * Copyright (C) 2013 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#import "config.h" >- >-#import "EnvironmentUtilities.h" >-#import "PluginProcess.h" >-#import "WKBase.h" >-#import "XPCServiceEntryPoint.h" >-#import <wtf/RunLoop.h> >- >-#if ENABLE(NETSCAPE_PLUGIN_API) >- >-namespace WebKit { >- >-class PluginServiceInitializerDelegate : public XPCServiceInitializerDelegate { >-public: >- PluginServiceInitializerDelegate(OSObjectPtr<xpc_connection_t> connection, xpc_object_t initializerMessage) >- : XPCServiceInitializerDelegate(WTFMove(connection), initializerMessage) >- { >- } >- >- virtual bool getExtraInitializationData(HashMap<String, String>& extraInitializationData) >- { >- xpc_object_t extraDataInitializationDataObject = xpc_dictionary_get_value(m_initializerMessage, "extra-initialization-data"); >- >- String pluginPath = xpc_dictionary_get_string(extraDataInitializationDataObject, "plugin-path"); >- if (pluginPath.isEmpty()) >- return false; >- extraInitializationData.add("plugin-path", pluginPath); >- >- String disableSandbox = xpc_dictionary_get_string(extraDataInitializationDataObject, "disable-sandbox"); >- if (!disableSandbox.isEmpty()) >- extraInitializationData.add("disable-sandbox", disableSandbox); >- >- String experimentalSandboxPlugIn = xpc_dictionary_get_string(extraDataInitializationDataObject, "experimental-sandbox-plugin"); >- if (!experimentalSandboxPlugIn.isEmpty()) >- extraInitializationData.add("experimental-sandbox-plugin"_s, experimentalSandboxPlugIn); >- >- return true; >- } >-}; >- >-} // namespace WebKit >- >-using namespace WebKit; >- >-#endif // ENABLE(NETSCAPE_PLUGIN_API) >- >-extern "C" WK_EXPORT void PluginServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage); >- >-void PluginServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage) >-{ >-#if ENABLE(NETSCAPE_PLUGIN_API) >- // FIXME: Add support for teardown from PluginProcessMain.mm >- >- // Remove the PluginProcess shim from the DYLD_INSERT_LIBRARIES environment variable so any processes >- // spawned by the PluginProcess don't try to insert the shim and crash. >- EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/PluginProcessShim.dylib"); >- XPCServiceInitializer<PluginProcess, PluginServiceInitializerDelegate>(adoptOSObject(connection), initializerMessage, priorityBoostMessage); >-#endif // ENABLE(NETSCAPE_PLUGIN_API) >-} >Index: Source/WebKit/PluginProcess/EntryPoint/Cocoa/XPCService/PluginService.64.Info.plist >=================================================================== >--- Source/WebKit/PluginProcess/EntryPoint/Cocoa/XPCService/PluginService.64.Info.plist (revision 240850) (from Source/WebKit/PluginProcess/EntryPoint/mac/XPCService/PluginService.64.Info.plist:240850) >+++ Source/WebKit/PluginProcess/EntryPoint/Cocoa/XPCService/PluginService.64.Info.plist (working copy) >@@ -0,0 +1,58 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >+<plist version="1.0"> >+<dict> >+ <key>CFBundleGetInfoString</key> >+ <string>${BUNDLE_VERSION}, Copyright 2003-2019 Apple Inc.</string> >+ <key>CFBundleDevelopmentRegion</key> >+ <string>English</string> >+ <key>CFBundleExecutable</key> >+ <string>${EXECUTABLE_NAME}</string> >+ <key>CFBundleIdentifier</key> >+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> >+ <key>CFBundleInfoDictionaryVersion</key> >+ <string>6.0</string> >+ <key>CFBundleName</key> >+ <string>${PRODUCT_NAME}</string> >+ <key>CFBundlePackageType</key> >+ <string>XPC!</string> >+ <key>CFBundleShortVersionString</key> >+ <string>${SHORT_VERSION_STRING}</string> >+ <key>CFBundleSignature</key> >+ <string>????</string> >+ <key>CFBundleVersion</key> >+ <string>${BUNDLE_VERSION}</string> >+ <key>LSFileQuarantineEnabled</key> >+ <false/> >+ <key>NSPrincipalClass</key> >+ <string>NSApplication</string> >+ <key>WebKitEntryPoint</key> >+ <string>PluginServiceInitializer</string> >+ <key>LSUIElement</key> >+ <true/> >+ <key>NSSupportsAutomaticGraphicsSwitching</key> >+ <true/> >+ <key>NSSupportsAppNap</key> >+ <true/> >+ <key>XPCService</key> >+ <dict> >+ <key>ServiceType</key> >+ <string>Application</string> >+ <key>RunLoopType</key> >+ <string>_NSApplicationMain</string> >+ <key>JoinExistingSession</key> >+ <true/> >+ <key>_MultipleInstances</key> >+ <true/> >+ <key>_AbandonCoalition</key> >+ <true/> >+ <key>_HighBitsASLR</key> >+ <true/> >+ <key>EnvironmentVariables</key> >+ <dict> >+ <key>NSStringDisableTagged</key> >+ <string>YES</string> >+ </dict> >+ </dict> >+</dict> >+</plist> >Index: Source/WebKit/PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm >=================================================================== >--- Source/WebKit/PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm (revision 240850) (from Source/WebKit/PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:240850) >+++ Source/WebKit/PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm (working copy) >@@ -0,0 +1,84 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import "config.h" >+ >+#import "EnvironmentUtilities.h" >+#import "PluginProcess.h" >+#import "WKBase.h" >+#import "XPCServiceEntryPoint.h" >+#import <wtf/RunLoop.h> >+ >+#if ENABLE(NETSCAPE_PLUGIN_API) >+ >+namespace WebKit { >+ >+class PluginServiceInitializerDelegate : public XPCServiceInitializerDelegate { >+public: >+ PluginServiceInitializerDelegate(OSObjectPtr<xpc_connection_t> connection, xpc_object_t initializerMessage) >+ : XPCServiceInitializerDelegate(WTFMove(connection), initializerMessage) >+ { >+ } >+ >+ virtual bool getExtraInitializationData(HashMap<String, String>& extraInitializationData) >+ { >+ xpc_object_t extraDataInitializationDataObject = xpc_dictionary_get_value(m_initializerMessage, "extra-initialization-data"); >+ >+ String pluginPath = xpc_dictionary_get_string(extraDataInitializationDataObject, "plugin-path"); >+ if (pluginPath.isEmpty()) >+ return false; >+ extraInitializationData.add("plugin-path", pluginPath); >+ >+ String disableSandbox = xpc_dictionary_get_string(extraDataInitializationDataObject, "disable-sandbox"); >+ if (!disableSandbox.isEmpty()) >+ extraInitializationData.add("disable-sandbox", disableSandbox); >+ >+ String experimentalSandboxPlugIn = xpc_dictionary_get_string(extraDataInitializationDataObject, "experimental-sandbox-plugin"); >+ if (!experimentalSandboxPlugIn.isEmpty()) >+ extraInitializationData.add("experimental-sandbox-plugin"_s, experimentalSandboxPlugIn); >+ >+ return true; >+ } >+}; >+ >+} // namespace WebKit >+ >+using namespace WebKit; >+ >+#endif // ENABLE(NETSCAPE_PLUGIN_API) >+ >+extern "C" WK_EXPORT void PluginServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage); >+ >+void PluginServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage) >+{ >+#if ENABLE(NETSCAPE_PLUGIN_API) >+ // FIXME: Add support for teardown from PluginProcessMain.mm >+ >+ // Remove the PluginProcess shim from the DYLD_INSERT_LIBRARIES environment variable so any processes >+ // spawned by the PluginProcess don't try to insert the shim and crash. >+ EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/PluginProcessShim.dylib"); >+ XPCServiceInitializer<PluginProcess, PluginServiceInitializerDelegate>(adoptOSObject(connection), initializerMessage, priorityBoostMessage); >+#endif // ENABLE(NETSCAPE_PLUGIN_API) >+} >Index: Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h >=================================================================== >--- Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h (revision 240850) >+++ Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h (nonexistent) >@@ -1,135 +0,0 @@ >-/* >- * Copyright (C) 2013 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#pragma once >- >-#import "AuxiliaryProcess.h" >-#import "WebKit2Initialize.h" >-#import <JavaScriptCore/ExecutableAllocator.h> >-#import <wtf/OSObjectPtr.h> >-#import <wtf/spi/darwin/XPCSPI.h> >- >-#if HAVE(VOUCHERS) >-#if USE(APPLE_INTERNAL_SDK) >-#include <os/voucher_private.h> >-#else >-extern "C" OS_NOTHROW void voucher_replace_default_voucher(void); >-#endif >-#endif >- >-namespace WebKit { >- >-class XPCServiceInitializerDelegate { >-public: >- XPCServiceInitializerDelegate(OSObjectPtr<xpc_connection_t> connection, xpc_object_t initializerMessage) >- : m_connection(WTFMove(connection)) >- , m_initializerMessage(initializerMessage) >- { >- } >- >- virtual ~XPCServiceInitializerDelegate(); >- >- virtual bool checkEntitlements(); >- >- virtual bool getConnectionIdentifier(IPC::Connection::Identifier& identifier); >- virtual bool getProcessIdentifier(WebCore::ProcessIdentifier&); >- virtual bool getClientIdentifier(String& clientIdentifier); >- virtual bool getClientProcessName(String& clientProcessName); >- virtual bool getExtraInitializationData(HashMap<String, String>& extraInitializationData); >- >-protected: >- bool hasEntitlement(const char* entitlement); >- bool isClientSandboxed(); >- >- OSObjectPtr<xpc_connection_t> m_connection; >- xpc_object_t m_initializerMessage; >-}; >- >-template<typename XPCServiceType> >-void initializeAuxiliaryProcess(AuxiliaryProcessInitializationParameters&& parameters) >-{ >- XPCServiceType::singleton().initialize(WTFMove(parameters)); >-} >- >-template<typename XPCServiceType, typename XPCServiceInitializerDelegateType> >-void XPCServiceInitializer(OSObjectPtr<xpc_connection_t> connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage) >-{ >- if (initializerMessage && xpc_dictionary_get_bool(initializerMessage, "disable-jit")) >- JSC::ExecutableAllocator::setJITEnabled(false); >- >- XPCServiceInitializerDelegateType delegate(WTFMove(connection), initializerMessage); >- >- // We don't want XPC to be in charge of whether the process should be terminated or not, >- // so ensure that we have an outstanding transaction here. >-ALLOW_DEPRECATED_DECLARATIONS_BEGIN >- xpc_transaction_begin(); >-ALLOW_DEPRECATED_DECLARATIONS_END >- >- InitializeWebKit2(); >- >- if (!delegate.checkEntitlements()) >- exit(EXIT_FAILURE); >- >- AuxiliaryProcessInitializationParameters parameters; >- if (priorityBoostMessage) >- parameters.priorityBoostMessage = priorityBoostMessage; >- >- if (!delegate.getConnectionIdentifier(parameters.connectionIdentifier)) >- exit(EXIT_FAILURE); >- >- if (!delegate.getClientIdentifier(parameters.clientIdentifier)) >- exit(EXIT_FAILURE); >- >- WebCore::ProcessIdentifier processIdentifier; >- if (!delegate.getProcessIdentifier(processIdentifier)) >- exit(EXIT_FAILURE); >- parameters.processIdentifier = processIdentifier; >- >- if (!delegate.getClientProcessName(parameters.uiProcessName)) >- exit(EXIT_FAILURE); >- >- if (!delegate.getExtraInitializationData(parameters.extraInitializationData)) >- exit(EXIT_FAILURE); >- >-#if HAVE(VOUCHERS) >- // Set the task default voucher to the current value (as propagated by XPC). >- voucher_replace_default_voucher(); >-#endif >- >-#if HAVE(QOS_CLASSES) >- if (parameters.extraInitializationData.contains("always-runs-at-background-priority"_s)) >- Thread::setGlobalMaxQOSClass(QOS_CLASS_UTILITY); >-#endif >- >- parameters.processType = XPCServiceType::processType; >- >- initializeAuxiliaryProcess<XPCServiceType>(WTFMove(parameters)); >-} >- >-int XPCServiceMain(int, const char**); >- >-void XPCServiceExit(OSObjectPtr<xpc_object_t>&& priorityBoostMessage); >- >-} // namespace WebKit >Index: Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm >=================================================================== >--- Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm (revision 240850) >+++ Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm (nonexistent) >@@ -1,166 +0,0 @@ >-/* >- * Copyright (C) 2013 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#import "config.h" >- >-#import "ArgumentCodersCF.h" >-#import "SandboxUtilities.h" >-#import "XPCServiceEntryPoint.h" >-#import <WebCore/ProcessIdentifier.h> >-#import <wtf/cocoa/Entitlements.h> >- >-namespace WebKit { >-using namespace WebCore; >- >-XPCServiceInitializerDelegate::~XPCServiceInitializerDelegate() >-{ >-} >- >-bool XPCServiceInitializerDelegate::checkEntitlements() >-{ >-#if PLATFORM(MAC) >- if (!isClientSandboxed()) >- return true; >- >- // FIXME: Once we're 100% sure that a process can't access the network we can get rid of this requirement for all processes. >- if (!hasEntitlement("com.apple.security.network.client")) { >- NSLog(@"Application does not have the 'com.apple.security.network.client' entitlement."); >- return false; >- } >-#endif >-#if PLATFORM(IOS_FAMILY) >- auto value = adoptOSObject(xpc_connection_copy_entitlement_value(m_connection.get(), "keychain-access-groups")); >- if (value && xpc_get_type(value.get()) == XPC_TYPE_ARRAY) { >- xpc_array_apply(value.get(), ^bool(size_t index, xpc_object_t object) { >- if (xpc_get_type(object) == XPC_TYPE_STRING && !strcmp(xpc_string_get_string_ptr(object), "com.apple.identities")) { >- IPC::setAllowsDecodingSecKeyRef(true); >- return false; >- } >- return true; >- }); >- } >-#endif >- >- return true; >-} >- >-bool XPCServiceInitializerDelegate::getConnectionIdentifier(IPC::Connection::Identifier& identifier) >-{ >- mach_port_t port = xpc_dictionary_copy_mach_send(m_initializerMessage, "server-port"); >- if (port == MACH_PORT_NULL) >- return false; >- >- identifier = IPC::Connection::Identifier(port, m_connection); >- return true; >-} >- >-bool XPCServiceInitializerDelegate::getClientIdentifier(String& clientIdentifier) >-{ >- clientIdentifier = xpc_dictionary_get_string(m_initializerMessage, "client-identifier"); >- if (clientIdentifier.isEmpty()) >- return false; >- return true; >-} >- >-bool XPCServiceInitializerDelegate::getProcessIdentifier(ProcessIdentifier& identifier) >-{ >- String processIdentifierString = xpc_dictionary_get_string(m_initializerMessage, "process-identifier"); >- if (processIdentifierString.isEmpty()) >- return false; >- >- bool ok; >- auto parsedIdentifier = processIdentifierString.toUInt64Strict(&ok); >- if (!ok) >- return false; >- >- identifier = makeObjectIdentifier<ProcessIdentifierType>(parsedIdentifier); >- return true; >-} >- >-bool XPCServiceInitializerDelegate::getClientProcessName(String& clientProcessName) >-{ >- clientProcessName = xpc_dictionary_get_string(m_initializerMessage, "ui-process-name"); >- if (clientProcessName.isEmpty()) >- return false; >- return true; >-} >- >-bool XPCServiceInitializerDelegate::getExtraInitializationData(HashMap<String, String>& extraInitializationData) >-{ >- xpc_object_t extraDataInitializationDataObject = xpc_dictionary_get_value(m_initializerMessage, "extra-initialization-data"); >- >- String inspectorProcess = xpc_dictionary_get_string(extraDataInitializationDataObject, "inspector-process"); >- if (!inspectorProcess.isEmpty()) >- extraInitializationData.add("inspector-process"_s, inspectorProcess); >- >-#if ENABLE(SERVICE_WORKER) >- String serviceWorkerProcess = xpc_dictionary_get_string(extraDataInitializationDataObject, "service-worker-process"); >- if (!serviceWorkerProcess.isEmpty()) >- extraInitializationData.add("service-worker-process"_s, serviceWorkerProcess); >-#endif >- >- String isPrewarmedProcess = xpc_dictionary_get_string(extraDataInitializationDataObject, "is-prewarmed"); >- if (!isPrewarmedProcess.isEmpty()) >- extraInitializationData.add("is-prewarmed"_s, isPrewarmedProcess); >- >- String securityOrigin = xpc_dictionary_get_string(extraDataInitializationDataObject, "security-origin"); >- if (!securityOrigin.isEmpty()) >- extraInitializationData.add("security-origin"_s, securityOrigin); >- >- if (!isClientSandboxed()) { >- String userDirectorySuffix = xpc_dictionary_get_string(extraDataInitializationDataObject, "user-directory-suffix"); >- if (!userDirectorySuffix.isEmpty()) >- extraInitializationData.add("user-directory-suffix"_s, userDirectorySuffix); >- } >- >- String alwaysRunsAtBackgroundPriority = xpc_dictionary_get_string(extraDataInitializationDataObject, "always-runs-at-background-priority"); >- if (!alwaysRunsAtBackgroundPriority.isEmpty()) >- extraInitializationData.add("always-runs-at-background-priority"_s, alwaysRunsAtBackgroundPriority); >- >- return true; >-} >- >-bool XPCServiceInitializerDelegate::hasEntitlement(const char* entitlement) >-{ >- return WTF::hasEntitlement(m_connection.get(), entitlement); >-} >- >-bool XPCServiceInitializerDelegate::isClientSandboxed() >-{ >- return connectedProcessIsSandboxed(m_connection.get()); >-} >- >-void XPCServiceExit(OSObjectPtr<xpc_object_t>&& priorityBoostMessage) >-{ >- // Make sure to destroy the priority boost message to avoid leaking a transaction. >- priorityBoostMessage = nullptr; >- // Balances the xpc_transaction_begin() in XPCServiceInitializer. >-ALLOW_DEPRECATED_DECLARATIONS_BEGIN >- xpc_transaction_end(); >-ALLOW_DEPRECATED_DECLARATIONS_END >- xpc_transaction_exit_clean(); >-} >- >-} // namespace WebKit >Index: Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm >=================================================================== >--- Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm (revision 240850) >+++ Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm (nonexistent) >@@ -1,166 +0,0 @@ >-/* >- * Copyright (C) 2013-2018 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#import "config.h" >-#import "WebProcessCocoa.h" >-#import "XPCServiceEntryPoint.h" >- >-#import <CoreFoundation/CoreFoundation.h> >-#import <wtf/OSObjectPtr.h> >-#import <wtf/RetainPtr.h> >-#import <wtf/spi/darwin/XPCSPI.h> >- >-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >-#import <pal/spi/mac/NSApplicationSPI.h> >-#endif >- >-namespace WebKit { >- >-static void XPCServiceEventHandler(xpc_connection_t peer) >-{ >- static xpc_object_t priorityBoostMessage = nullptr; >- >- xpc_connection_set_target_queue(peer, dispatch_get_main_queue()); >- xpc_connection_set_event_handler(peer, ^(xpc_object_t event) { >- xpc_type_t type = xpc_get_type(event); >- if (type == XPC_TYPE_ERROR) { >- if (event == XPC_ERROR_CONNECTION_INVALID || event == XPC_ERROR_TERMINATION_IMMINENT) { >- // FIXME: Handle this case more gracefully. >- exit(EXIT_FAILURE); >- } >- } else { >- assert(type == XPC_TYPE_DICTIONARY); >- >- if (!strcmp(xpc_dictionary_get_string(event, "message-name"), "bootstrap")) { >- CFBundleRef webKitBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebKit")); >- CFStringRef entryPointFunctionName = (CFStringRef)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), CFSTR("WebKitEntryPoint")); >- >- typedef void (*InitializerFunction)(xpc_connection_t, xpc_object_t, xpc_object_t); >- InitializerFunction initializerFunctionPtr = reinterpret_cast<InitializerFunction>(CFBundleGetFunctionPointerForName(webKitBundle, entryPointFunctionName)); >- if (!initializerFunctionPtr) { >- NSLog(@"Unable to find entry point in WebKit.framework with name: %@", (__bridge NSString *)entryPointFunctionName); >- exit(EXIT_FAILURE); >- } >- >- auto reply = adoptOSObject(xpc_dictionary_create_reply(event)); >- xpc_dictionary_set_string(reply.get(), "message-name", "process-finished-launching"); >- xpc_connection_send_message(xpc_dictionary_get_remote_connection(event), reply.get()); >- >- int fd = xpc_dictionary_dup_fd(event, "stdout"); >- if (fd != -1) >- dup2(fd, STDOUT_FILENO); >- >- fd = xpc_dictionary_dup_fd(event, "stderr"); >- if (fd != -1) >- dup2(fd, STDERR_FILENO); >- >- initializerFunctionPtr(peer, event, priorityBoostMessage); >- if (priorityBoostMessage) >- xpc_release(priorityBoostMessage); >- } >- >- // Leak a boost onto the NetworkProcess. >- if (!strcmp(xpc_dictionary_get_string(event, "message-name"), "pre-bootstrap")) { >- assert(!priorityBoostMessage); >- priorityBoostMessage = xpc_retain(event); >- } >- } >- }); >- >- xpc_connection_resume(peer); >-} >- >-int XPCServiceMain(int, const char**) >-{ >-#if defined(__i386__) >- // FIXME: This should only be done for the 32-bit plug-in XPC service so we rely on the fact that >- // it's the only of the XPC services that are 32-bit. We should come up with a more targeted #if check. >- @autoreleasepool { >- // We must set the state of AppleMagnifiedMode before NSApplication initialization so that the value will be in >- // place before Cocoa startup logic runs and caches the value. >- [[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"AppleMagnifiedMode" : @YES }]; >- } >-#endif >- >- auto bootstrap = adoptOSObject(xpc_copy_bootstrap()); >-#if PLATFORM(IOS_FAMILY) >- auto containerEnvironmentVariables = xpc_dictionary_get_value(bootstrap.get(), "ContainerEnvironmentVariables"); >- xpc_dictionary_apply(containerEnvironmentVariables, ^(const char *key, xpc_object_t value) { >- setenv(key, xpc_string_get_string_ptr(value), 1); >- return true; >- }); >-#endif >- >- if (bootstrap) { >-#if PLATFORM(MAC) >- if (const char* webKitBundleVersion = xpc_dictionary_get_string(bootstrap.get(), "WebKitBundleVersion")) { >- CFBundleRef webKitBundle = CFBundleGetBundleWithIdentifier(CFSTR("com.apple.WebKit")); >- NSString *expectedBundleVersion = (NSString *)CFBundleGetValueForInfoDictionaryKey(webKitBundle, kCFBundleVersionKey); >- >- if (strcmp(webKitBundleVersion, expectedBundleVersion.UTF8String)) { >- _WKSetCrashReportApplicationSpecificInformation([NSString stringWithFormat:@"WebKit framework version mismatch: '%s'", webKitBundleVersion]); >- __builtin_trap(); >- } >- } >-#endif >- >- if (xpc_object_t languages = xpc_dictionary_get_value(bootstrap.get(), "OverrideLanguages")) { >- @autoreleasepool { >- NSDictionary *existingArguments = [[NSUserDefaults standardUserDefaults] volatileDomainForName:NSArgumentDomain]; >- NSMutableDictionary *newArguments = [existingArguments mutableCopy]; >- RetainPtr<NSMutableArray> newLanguages = adoptNS([[NSMutableArray alloc] init]); >- xpc_array_apply(languages, ^(size_t index, xpc_object_t value) { >- [newLanguages addObject:[NSString stringWithCString:xpc_string_get_string_ptr(value) encoding:NSUTF8StringEncoding]]; >- return true; >- }); >- [newArguments setValue:newLanguages.get() forKey:@"AppleLanguages"]; >- [[NSUserDefaults standardUserDefaults] setVolatileDomain:newArguments forName:NSArgumentDomain]; >- } >- } >- } >- >-#if PLATFORM(MAC) >- // Don't allow Apple Events in WebKit processes. This can be removed when <rdar://problem/14012823> is fixed. >- setenv("__APPLEEVENTSSERVICENAME", "", 1); >- >-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >- // We don't need to talk to the dock. >- if (Class nsApplicationClass = NSClassFromString(@"NSApplication")) { >- if ([nsApplicationClass respondsToSelector:@selector(_preventDockConnections)]) >- [nsApplicationClass _preventDockConnections]; >- } >-#endif >-#endif >- >- xpc_main(XPCServiceEventHandler); >- return 0; >-} >- >-} // namespace WebKit >- >-int main(int argc, const char** argv) >-{ >- return WebKit::XPCServiceMain(argc, argv); >-} >Index: Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h >=================================================================== >--- Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h (revision 240850) >+++ Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h (working copy) >@@ -53,7 +53,7 @@ public: > > virtual bool checkEntitlements(); > >- virtual bool getConnectionIdentifier(IPC::Connection::Identifier& identifier); >+ virtual bool getConnectionIdentifier(IPC::Connection::Identifier&); > virtual bool getProcessIdentifier(WebCore::ProcessIdentifier&); > virtual bool getClientIdentifier(String& clientIdentifier); > virtual bool getClientProcessName(String& clientProcessName); >Index: Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm >=================================================================== >--- Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm (revision 240850) >+++ Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm (working copy) >@@ -24,10 +24,10 @@ > */ > > #import "config.h" >+#import "XPCServiceEntryPoint.h" > > #import "ArgumentCodersCF.h" > #import "SandboxUtilities.h" >-#import "XPCServiceEntryPoint.h" > #import <WebCore/ProcessIdentifier.h> > #import <wtf/cocoa/Entitlements.h> > >Index: Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm >=================================================================== >--- Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm (revision 240850) >+++ Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm (working copy) >@@ -32,7 +32,7 @@ > #import <wtf/RetainPtr.h> > #import <wtf/spi/darwin/XPCSPI.h> > >-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 >+#if PLATFORM(MAC) > #import <pal/spi/mac/NSApplicationSPI.h> > #endif > >Index: Source/WebKit/WebKit.xcodeproj/project.pbxproj >=================================================================== >--- Source/WebKit/WebKit.xcodeproj/project.pbxproj (revision 240850) >+++ Source/WebKit/WebKit.xcodeproj/project.pbxproj (working copy) >@@ -8035,7 +8035,7 @@ > BC82839616B47EC400A278FE /* XPCServiceMain.mm */, > ); > name = XPCService; >- path = mac/XPCService; >+ path = Cocoa/XPCService; > sourceTree = "<group>"; > }; > BC82837C16B45DA500A278FE /* EntryPoint */ = { >@@ -8061,7 +8061,7 @@ > BC8283A816B4BD9100A278FE /* NetworkServiceEntryPoint.mm */, > ); > name = XPCService; >- path = mac/XPCService; >+ path = Cocoa/XPCService; > sourceTree = "<group>"; > }; > BC8283A216B4BD9100A278FE /* NetworkService */ = { >@@ -8080,7 +8080,7 @@ > BC8283EF16B4F8E200A278FE /* PluginServiceEntryPoint.mm */, > ); > name = XPCService; >- path = mac/XPCService; >+ path = Cocoa/XPCService; > sourceTree = "<group>"; > }; > BC8283E916B4F8E200A278FE /* PluginService */ = { >@@ -8147,7 +8147,7 @@ > BC82839816B48DC000A278FE /* WebContentServiceEntryPoint.mm */, > ); > name = XPCService; >- path = mac/XPCService; >+ path = Cocoa/XPCService; > sourceTree = "<group>"; > }; > BCACC43F16B24CAA00B6E092 /* WebContentService */ = { >Index: Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist >=================================================================== >--- Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist (revision 240850) >+++ Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist (nonexistent) >@@ -1,55 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >-<plist version="1.0"> >-<dict> >- <key>CFBundleFollowParentLocalization</key> >- <true/> >- <key>CFBundleGetInfoString</key> >- <string>${BUNDLE_VERSION}, Copyright 2003-2019 Apple Inc.</string> >- <key>CFBundleDevelopmentRegion</key> >- <string>English</string> >- <key>CFBundleExecutable</key> >- <string>${EXECUTABLE_NAME}</string> >- <key>CFBundleIdentifier</key> >- <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> >- <key>CFBundleInfoDictionaryVersion</key> >- <string>6.0</string> >- <key>CFBundleName</key> >- <string>${PRODUCT_NAME}</string> >- <key>CFBundlePackageType</key> >- <string>XPC!</string> >- <key>CFBundleShortVersionString</key> >- <string>${SHORT_VERSION_STRING}</string> >- <key>CFBundleSignature</key> >- <string>????</string> >- <key>CFBundleVersion</key> >- <string>${BUNDLE_VERSION}</string> >- <key>LSFileQuarantineEnabled</key> >- <true/> >- <key>NSPrincipalClass</key> >- <string>NSApplication</string> >- <key>WebKitEntryPoint</key> >- <string>WebContentServiceInitializer</string> >- <key>LSUIElement</key> >- <true/> >- <key>NSSupportsAutomaticGraphicsSwitching</key> >- <true/> >- <key>NSSupportsAppNap</key> >- <true/> >- <key>NSMainNibFile</key> >- <string>WebContentProcess</string> >- <key>XPCService</key> >- <dict> >- <key>JoinExistingSession</key> >- <true/> >- <key>ServiceType</key> >- <string>Application</string> >- <key>RunLoopType</key> >- <string>${RUNLOOP_TYPE}</string> >- <key>_MultipleInstances</key> >- <true/> >- <key>_HighBitsASLR</key> >- <true/> >- </dict> >-</dict> >-</plist> >Index: Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist >=================================================================== >--- Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist (revision 240850) >+++ Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist (nonexistent) >@@ -1,49 +0,0 @@ >-<?xml version="1.0" encoding="UTF-8"?> >-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >-<plist version="1.0"> >-<dict> >- <key>CFBundleFollowParentLocalization</key> >- <true/> >- <key>CFBundleGetInfoString</key> >- <string>${BUNDLE_VERSION}, Copyright 2003-2019 Apple Inc.</string> >- <key>CFBundleDevelopmentRegion</key> >- <string>English</string> >- <key>CFBundleExecutable</key> >- <string>${EXECUTABLE_NAME}</string> >- <key>CFBundleIdentifier</key> >- <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> >- <key>CFBundleInfoDictionaryVersion</key> >- <string>6.0</string> >- <key>CFBundleName</key> >- <string>${PRODUCT_NAME}</string> >- <key>CFBundlePackageType</key> >- <string>XPC!</string> >- <key>CFBundleShortVersionString</key> >- <string>${SHORT_VERSION_STRING}</string> >- <key>CFBundleSignature</key> >- <string>????</string> >- <key>CFBundleVersion</key> >- <string>${BUNDLE_VERSION}</string> >- <key>LSFileQuarantineEnabled</key> >- <true/> >- <key>WebKitEntryPoint</key> >- <string>WebContentServiceInitializer</string> >- <key>XPCService</key> >- <dict> >- <key>ServiceType</key> >- <string>Application</string> >- <key>RunLoopType</key> >- <string>NSRunLoop</string> >- <key>_MultipleInstances</key> >- <true/> >- <key>_HighBitsASLR</key> >- <true/> >- </dict> >- <key>UIBackgroundModes</key> >- <array> >- <string>audio</string> >- </array> >- <key>CanInheritApplicationStateFromOtherProcesses</key> >- <true/> >-</dict> >-</plist> >Index: Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm >=================================================================== >--- Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm (revision 240850) >+++ Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm (nonexistent) >@@ -1,52 +0,0 @@ >-/* >- * Copyright (C) 2012 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#import "config.h" >- >-#import "EnvironmentUtilities.h" >-#import "WKBase.h" >-#import "WebProcess.h" >-#import "XPCServiceEntryPoint.h" >- >-#if PLATFORM(IOS_FAMILY) >-#import <WebCore/WebCoreThreadSystemInterface.h> >-#import <pal/spi/ios/GraphicsServicesSPI.h> >-#endif >- >-extern "C" WK_EXPORT void WebContentServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage); >- >-void WebContentServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage) >-{ >- // Remove the WebProcessShim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by >- // the this process don't try to insert the shim and crash. >- WebKit::EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/WebProcessShim.dylib"); >- >-#if PLATFORM(IOS_FAMILY) >- GSInitialize(); >- InitWebCoreThreadSystemInterface(); >-#endif // PLATFORM(IOS_FAMILY) >- >- WebKit::XPCServiceInitializer<WebKit::WebProcess, WebKit::XPCServiceInitializerDelegate>(adoptOSObject(connection), initializerMessage, priorityBoostMessage); >-} >Index: Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm >=================================================================== >--- Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm (revision 240850) (from Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:240850) >+++ Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm (working copy) >@@ -0,0 +1,52 @@ >+/* >+ * Copyright (C) 2012 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import "config.h" >+ >+#import "EnvironmentUtilities.h" >+#import "WKBase.h" >+#import "WebProcess.h" >+#import "XPCServiceEntryPoint.h" >+ >+#if PLATFORM(IOS_FAMILY) >+#import <WebCore/WebCoreThreadSystemInterface.h> >+#import <pal/spi/ios/GraphicsServicesSPI.h> >+#endif >+ >+extern "C" WK_EXPORT void WebContentServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage); >+ >+void WebContentServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage) >+{ >+ // Remove the WebProcessShim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by >+ // the this process don't try to insert the shim and crash. >+ WebKit::EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/WebProcessShim.dylib"); >+ >+#if PLATFORM(IOS_FAMILY) >+ GSInitialize(); >+ InitWebCoreThreadSystemInterface(); >+#endif // PLATFORM(IOS_FAMILY) >+ >+ WebKit::XPCServiceInitializer<WebKit::WebProcess, WebKit::XPCServiceInitializerDelegate>(adoptOSObject(connection), initializerMessage, priorityBoostMessage); >+} >Index: Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-OSX.plist >=================================================================== >--- Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-OSX.plist (revision 240850) (from Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:240850) >+++ Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-OSX.plist (working copy) >@@ -0,0 +1,55 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >+<plist version="1.0"> >+<dict> >+ <key>CFBundleFollowParentLocalization</key> >+ <true/> >+ <key>CFBundleGetInfoString</key> >+ <string>${BUNDLE_VERSION}, Copyright 2003-2019 Apple Inc.</string> >+ <key>CFBundleDevelopmentRegion</key> >+ <string>English</string> >+ <key>CFBundleExecutable</key> >+ <string>${EXECUTABLE_NAME}</string> >+ <key>CFBundleIdentifier</key> >+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> >+ <key>CFBundleInfoDictionaryVersion</key> >+ <string>6.0</string> >+ <key>CFBundleName</key> >+ <string>${PRODUCT_NAME}</string> >+ <key>CFBundlePackageType</key> >+ <string>XPC!</string> >+ <key>CFBundleShortVersionString</key> >+ <string>${SHORT_VERSION_STRING}</string> >+ <key>CFBundleSignature</key> >+ <string>????</string> >+ <key>CFBundleVersion</key> >+ <string>${BUNDLE_VERSION}</string> >+ <key>LSFileQuarantineEnabled</key> >+ <true/> >+ <key>NSPrincipalClass</key> >+ <string>NSApplication</string> >+ <key>WebKitEntryPoint</key> >+ <string>WebContentServiceInitializer</string> >+ <key>LSUIElement</key> >+ <true/> >+ <key>NSSupportsAutomaticGraphicsSwitching</key> >+ <true/> >+ <key>NSSupportsAppNap</key> >+ <true/> >+ <key>NSMainNibFile</key> >+ <string>WebContentProcess</string> >+ <key>XPCService</key> >+ <dict> >+ <key>JoinExistingSession</key> >+ <true/> >+ <key>ServiceType</key> >+ <string>Application</string> >+ <key>RunLoopType</key> >+ <string>${RUNLOOP_TYPE}</string> >+ <key>_MultipleInstances</key> >+ <true/> >+ <key>_HighBitsASLR</key> >+ <true/> >+ </dict> >+</dict> >+</plist> >Index: Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist >=================================================================== >--- Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist (revision 240850) (from Source/WebKit/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:240850) >+++ Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentService/Info-iOS.plist (working copy) >@@ -0,0 +1,49 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >+<plist version="1.0"> >+<dict> >+ <key>CFBundleFollowParentLocalization</key> >+ <true/> >+ <key>CFBundleGetInfoString</key> >+ <string>${BUNDLE_VERSION}, Copyright 2003-2019 Apple Inc.</string> >+ <key>CFBundleDevelopmentRegion</key> >+ <string>English</string> >+ <key>CFBundleExecutable</key> >+ <string>${EXECUTABLE_NAME}</string> >+ <key>CFBundleIdentifier</key> >+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> >+ <key>CFBundleInfoDictionaryVersion</key> >+ <string>6.0</string> >+ <key>CFBundleName</key> >+ <string>${PRODUCT_NAME}</string> >+ <key>CFBundlePackageType</key> >+ <string>XPC!</string> >+ <key>CFBundleShortVersionString</key> >+ <string>${SHORT_VERSION_STRING}</string> >+ <key>CFBundleSignature</key> >+ <string>????</string> >+ <key>CFBundleVersion</key> >+ <string>${BUNDLE_VERSION}</string> >+ <key>LSFileQuarantineEnabled</key> >+ <true/> >+ <key>WebKitEntryPoint</key> >+ <string>WebContentServiceInitializer</string> >+ <key>XPCService</key> >+ <dict> >+ <key>ServiceType</key> >+ <string>Application</string> >+ <key>RunLoopType</key> >+ <string>NSRunLoop</string> >+ <key>_MultipleInstances</key> >+ <true/> >+ <key>_HighBitsASLR</key> >+ <true/> >+ </dict> >+ <key>UIBackgroundModes</key> >+ <array> >+ <string>audio</string> >+ </array> >+ <key>CanInheritApplicationStateFromOtherProcesses</key> >+ <true/> >+</dict> >+</plist>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
cdumez
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194129
:
360813
| 360868