WebKit Bugzilla
Attachment 360408 Details for
Bug 193943
: Rename ChildProcess to AuxiliaryProcess
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193943-20190128173631.patch (text/plain), 308.64 KB, created by
Alex Christensen
on 2019-01-28 17:36:32 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-01-28 17:36:32 PST
Size:
308.64 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 240626) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,313 @@ >+2019-01-28 Alex Christensen <achristensen@webkit.org> >+ >+ Rename ChildProcess to AuxiliaryProcess >+ https://bugs.webkit.org/show_bug.cgi?id=193943 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ "Child" implies that there is a parent, but I'm about to introduce a type of NetworkProcess that >+ doesn't always have a parent, and may have many UIProcesses that it is the auxiliary for. >+ >+ * CMakeLists.txt: >+ * DerivedSources-input.xcfilelist: >+ * DerivedSources-output.xcfilelist: >+ * DerivedSources.make: >+ * NetworkProcess/Cookies/WebCookieManager.cpp: >+ * NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp: >+ * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm: >+ (WebKit::initializeAuxiliaryProcess<NetworkProcess>): >+ (WebKit::initializeChildProcess<NetworkProcess>): Deleted. >+ * NetworkProcess/NetworkProcess.cpp: >+ (WebKit::callExitSoon): >+ (WebKit::NetworkProcess::NetworkProcess): >+ (WebKit::NetworkProcess::didReceiveMessage): >+ (WebKit::NetworkProcess::initializeConnection): >+ (WebKit::NetworkProcess::terminate): >+ (WebKit::NetworkProcess::initializeProcess): >+ (WebKit::NetworkProcess::initializeProcessName): >+ (WebKit::NetworkProcess::initializeSandbox): >+ * NetworkProcess/NetworkProcess.h: >+ * NetworkProcess/NetworkProcessSupplement.h: >+ * NetworkProcess/cache/NetworkCacheStorage.cpp: >+ (WebKit::NetworkCache::Storage::deleteOldVersions): >+ * NetworkProcess/ios/NetworkProcessIOS.mm: >+ (WebKit::NetworkProcess::initializeProcess): >+ (WebKit::NetworkProcess::initializeProcessName): >+ (WebKit::NetworkProcess::initializeSandbox): >+ * NetworkProcess/mac/NetworkProcessMac.mm: >+ (WebKit::NetworkProcess::initializeProcess): >+ (WebKit::NetworkProcess::initializeProcessName): >+ (WebKit::NetworkProcess::initializeSandbox): >+ * NetworkProcess/soup/NetworkProcessMainSoup.cpp: >+ (WebKit::initializeAuxiliaryProcess<NetworkProcess>): >+ (WebKit::NetworkProcessMainUnix): >+ (WebKit::initializeChildProcess<NetworkProcess>): Deleted. >+ * NetworkProcess/watchos/NetworkProximityManager.h: >+ * NetworkProcess/watchos/NetworkProximityManager.mm: >+ (WebKit::NetworkProximityManager::NetworkProximityManager): >+ * NetworkProcess/win/NetworkProcessMainWin.cpp: >+ (WebKit::initializeAuxiliaryProcess<NetworkProcess>): >+ (WebKit::NetworkProcessMainWin): >+ (WebKit::initializeChildProcess<NetworkProcess>): Deleted. >+ * PlatformGTK.cmake: >+ * PlatformMac.cmake: >+ * PlatformWin.cmake: >+ * PluginProcess/PluginProcess.cpp: >+ (WebKit::PluginProcess::initializeProcess): >+ (WebKit::PluginProcess::initializeConnection): >+ (WebKit::PluginProcess::didReceiveMessage): >+ (WebKit::PluginProcess::initializeProcessName): >+ (WebKit::PluginProcess::initializeSandbox): >+ * PluginProcess/PluginProcess.h: >+ * PluginProcess/mac/PluginProcessMac.mm: >+ (WebKit::PluginProcess::platformInitializeProcess): >+ (WebKit::PluginProcess::initializeProcessName): >+ (WebKit::PluginProcess::initializeSandbox): >+ (WebKit::PluginProcess::stopRunLoop): >+ * PluginProcess/unix/PluginProcessMainUnix.cpp: >+ (WebKit::PluginProcessMainUnix): >+ * PluginProcess/unix/PluginProcessUnix.cpp: >+ (WebKit::PluginProcess::platformInitializeProcess): >+ * Shared/Authentication/AuthenticationManager.cpp: >+ (WebKit::AuthenticationManager::AuthenticationManager): >+ * Shared/Authentication/AuthenticationManager.h: >+ * Shared/AuxiliaryProcess.cpp: Copied from Source/WebKit/Shared/ChildProcess.cpp. >+ (WebKit::AuxiliaryProcess::AuxiliaryProcess): >+ (WebKit::AuxiliaryProcess::~AuxiliaryProcess): >+ (WebKit::AuxiliaryProcess::didClose): >+ (WebKit::AuxiliaryProcess::initialize): >+ (WebKit::AuxiliaryProcess::setProcessSuppressionEnabled): >+ (WebKit::AuxiliaryProcess::initializeProcess): >+ (WebKit::AuxiliaryProcess::initializeProcessName): >+ (WebKit::AuxiliaryProcess::initializeConnection): >+ (WebKit::AuxiliaryProcess::addMessageReceiver): >+ (WebKit::AuxiliaryProcess::removeMessageReceiver): >+ (WebKit::AuxiliaryProcess::disableTermination): >+ (WebKit::AuxiliaryProcess::enableTermination): >+ (WebKit::AuxiliaryProcess::messageSenderConnection): >+ (WebKit::AuxiliaryProcess::messageSenderDestinationID): >+ (WebKit::AuxiliaryProcess::terminationTimerFired): >+ (WebKit::AuxiliaryProcess::stopRunLoop): >+ (WebKit::AuxiliaryProcess::platformStopRunLoop): >+ (WebKit::AuxiliaryProcess::terminate): >+ (WebKit::AuxiliaryProcess::shutDown): >+ (WebKit::AuxiliaryProcess::registerURLSchemeServiceWorkersCanHandle const): >+ (WebKit::AuxiliaryProcess::platformInitialize): >+ (WebKit::AuxiliaryProcess::initializeSandbox): >+ (WebKit::AuxiliaryProcess::didReceiveInvalidMessage): >+ (WebKit::AuxiliaryProcess::didReceiveMemoryPressureEvent): >+ (WebKit::ChildProcess::ChildProcess): Deleted. >+ (WebKit::ChildProcess::~ChildProcess): Deleted. >+ (WebKit::ChildProcess::didClose): Deleted. >+ (WebKit::ChildProcess::initialize): Deleted. >+ (WebKit::ChildProcess::setProcessSuppressionEnabled): Deleted. >+ (WebKit::ChildProcess::initializeProcess): Deleted. >+ (WebKit::ChildProcess::initializeProcessName): Deleted. >+ (WebKit::ChildProcess::initializeConnection): Deleted. >+ (WebKit::ChildProcess::addMessageReceiver): Deleted. >+ (WebKit::ChildProcess::removeMessageReceiver): Deleted. >+ (WebKit::ChildProcess::disableTermination): Deleted. >+ (WebKit::ChildProcess::enableTermination): Deleted. >+ (WebKit::ChildProcess::messageSenderConnection): Deleted. >+ (WebKit::ChildProcess::messageSenderDestinationID): Deleted. >+ (WebKit::ChildProcess::terminationTimerFired): Deleted. >+ (WebKit::ChildProcess::stopRunLoop): Deleted. >+ (WebKit::ChildProcess::platformStopRunLoop): Deleted. >+ (WebKit::ChildProcess::terminate): Deleted. >+ (WebKit::ChildProcess::shutDown): Deleted. >+ (WebKit::ChildProcess::registerURLSchemeServiceWorkersCanHandle const): Deleted. >+ (WebKit::ChildProcess::platformInitialize): Deleted. >+ (WebKit::ChildProcess::initializeSandbox): Deleted. >+ (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted. >+ (WebKit::ChildProcess::didReceiveMemoryPressureEvent): Deleted. >+ * Shared/AuxiliaryProcess.h: Copied from Source/WebKit/Shared/ChildProcess.h. >+ (WebKit::ChildProcess::parentProcessConnection const): Deleted. >+ (WebKit::ChildProcess::messageReceiverMap): Deleted. >+ (WebKit::ChildProcess::setTerminationTimeout): Deleted. >+ (WebKit::ChildProcess::shouldOverrideQuarantine): Deleted. >+ * Shared/AuxiliaryProcess.messages.in: Copied from Source/WebKit/Shared/ChildProcess.messages.in. >+ * Shared/AuxiliaryProcessSupplement.h: Copied from Source/WebKit/Shared/ChildProcessSupplement.h. >+ (WebKit::AuxiliaryProcessSupplement::~AuxiliaryProcessSupplement): >+ (WebKit::ChildProcessSupplement::~ChildProcessSupplement): Deleted. >+ (WebKit::ChildProcessSupplement::initializeConnection): Deleted. >+ * Shared/ChildProcess.cpp: Removed. >+ * Shared/ChildProcess.h: Removed. >+ * Shared/ChildProcess.messages.in: Removed. >+ * Shared/ChildProcessSupplement.h: Removed. >+ * Shared/Cocoa/AuxiliaryProcessCocoa.mm: Copied from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm. >+ (WebKit::AuxiliaryProcess::didReceiveInvalidMessage): >+ (WebKit::ChildProcess::didReceiveInvalidMessage): Deleted. >+ * Shared/Cocoa/ChildProcessCocoa.mm: Removed. >+ * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: >+ (WebKit::initializeAuxiliaryProcess): >+ (WebKit::XPCServiceInitializer): >+ (WebKit::initializeChildProcess): Deleted. >+ * Shared/WebSQLiteDatabaseTracker.cpp: >+ (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker): >+ (WebKit::WebSQLiteDatabaseTracker::hysteresisUpdated): >+ (WebKit::m_childProcessType): Deleted. >+ * Shared/WebSQLiteDatabaseTracker.h: >+ * Shared/ios/AuxiliaryProcessIOS.mm: Copied from Source/WebKit/Shared/ios/ChildProcessIOS.mm. >+ (WebKit::AuxiliaryProcess::platformInitialize): >+ (WebKit::AuxiliaryProcess::initializeSandbox): >+ (WebKit::AuxiliaryProcess::setQOS): >+ (WebKit::AuxiliaryProcess::platformStopRunLoop): >+ (WebKit::ChildProcess::platformInitialize): Deleted. >+ (WebKit::ChildProcess::initializeSandbox): Deleted. >+ (WebKit::ChildProcess::setQOS): Deleted. >+ (WebKit::ChildProcess::platformStopRunLoop): Deleted. >+ * Shared/ios/ChildProcessIOS.mm: Removed. >+ * Shared/mac/AuxiliaryProcessMac.mm: Copied from Source/WebKit/Shared/mac/ChildProcessMac.mm. >+ (WebKit::SandboxInfo::SandboxInfo): >+ (WebKit::AuxiliaryProcess::launchServicesCheckIn): >+ (WebKit::AuxiliaryProcess::platformInitialize): >+ (WebKit::processStorageClass): >+ (WebKit::sandboxDirectory): >+ (WebKit::applySandbox): >+ (WebKit::initializeSandboxParameters): >+ (WebKit::AuxiliaryProcess::initializeSandbox): >+ (WebKit::AuxiliaryProcess::stopNSAppRunLoop): >+ (WebKit::AuxiliaryProcess::stopNSRunLoop): >+ (WebKit::AuxiliaryProcess::platformStopRunLoop): >+ (WebKit::AuxiliaryProcess::setQOS): >+ (WebKit::AuxiliaryProcess::isSystemWebKit): >+ (WebKit::ChildProcess::launchServicesCheckIn): Deleted. >+ (WebKit::ChildProcess::platformInitialize): Deleted. >+ (WebKit::ChildProcess::initializeSandbox): Deleted. >+ (WebKit::ChildProcess::stopNSAppRunLoop): Deleted. >+ (WebKit::ChildProcess::stopNSRunLoop): Deleted. >+ (WebKit::ChildProcess::platformStopRunLoop): Deleted. >+ (WebKit::ChildProcess::setQOS): Deleted. >+ (WebKit::ChildProcess::isSystemWebKit): Deleted. >+ * Shared/mac/ChildProcessMac.mm: Removed. >+ * Shared/mac/SecItemShim.cpp: >+ (WebKit::globalNetworkProcess): >+ (WebKit::sendSecItemRequest): >+ (WebKit::initializeSecItemShim): >+ * Shared/mac/SecItemShim.h: >+ * Shared/unix/AuxiliaryProcessMain.cpp: Copied from Source/WebKit/Shared/unix/ChildProcessMain.cpp. >+ (WebKit::AuxiliaryProcessMainBase::parseCommandLine): >+ (WebKit::ChildProcessMainBase::parseCommandLine): Deleted. >+ * Shared/unix/AuxiliaryProcessMain.h: Copied from Source/WebKit/Shared/unix/ChildProcessMain.h. >+ (WebKit::AuxiliaryProcessMainBase::takeInitializationParameters): >+ (WebKit::initializeAuxiliaryProcess): >+ (WebKit::AuxiliaryProcessMain): >+ (WebKit::ChildProcessMainBase::platformInitialize): Deleted. >+ (WebKit::ChildProcessMainBase::platformFinalize): Deleted. >+ (WebKit::ChildProcessMainBase::takeInitializationParameters): Deleted. >+ (WebKit::initializeChildProcess): Deleted. >+ (WebKit::ChildProcessMain): Deleted. >+ * Shared/unix/ChildProcessMain.cpp: Removed. >+ * Shared/unix/ChildProcessMain.h: Removed. >+ * Shared/win/AuxiliaryProcessMainWin.cpp: Copied from Source/WebKit/Shared/win/ChildProcessMainWin.cpp. >+ (WebKit::AuxiliaryProcessMainBase::parseCommandLine): >+ (WebKit::ChildProcessMainBase::parseCommandLine): Deleted. >+ * Shared/win/ChildProcessMainWin.cpp: Removed. >+ * Sources.txt: >+ * SourcesCocoa.txt: >+ * SourcesGTK.txt: >+ * SourcesWPE.txt: >+ * UIProcess/Authentication/AuthenticationChallengeProxy.cpp: >+ * UIProcess/Authentication/AuthenticationChallengeProxy.h: >+ * UIProcess/AuxiliaryProcessProxy.cpp: Copied from Source/WebKit/UIProcess/ChildProcessProxy.cpp. >+ (WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy): >+ (WebKit::AuxiliaryProcessProxy::~AuxiliaryProcessProxy): >+ (WebKit::AuxiliaryProcessProxy::getLaunchOptions): >+ (WebKit::AuxiliaryProcessProxy::connect): >+ (WebKit::AuxiliaryProcessProxy::terminate): >+ (WebKit::AuxiliaryProcessProxy::state const): >+ (WebKit::AuxiliaryProcessProxy::sendMessage): >+ (WebKit::AuxiliaryProcessProxy::addMessageReceiver): >+ (WebKit::AuxiliaryProcessProxy::removeMessageReceiver): >+ (WebKit::AuxiliaryProcessProxy::dispatchMessage): >+ (WebKit::AuxiliaryProcessProxy::dispatchSyncMessage): >+ (WebKit::AuxiliaryProcessProxy::didFinishLaunching): >+ (WebKit::AuxiliaryProcessProxy::shutDownProcess): >+ (WebKit::AuxiliaryProcessProxy::setProcessSuppressionEnabled): >+ (WebKit::AuxiliaryProcessProxy::connectionWillOpen): >+ (WebKit::ChildProcessProxy::ChildProcessProxy): Deleted. >+ (WebKit::ChildProcessProxy::~ChildProcessProxy): Deleted. >+ (WebKit::ChildProcessProxy::getLaunchOptions): Deleted. >+ (WebKit::ChildProcessProxy::connect): Deleted. >+ (WebKit::ChildProcessProxy::terminate): Deleted. >+ (WebKit::ChildProcessProxy::state const): Deleted. >+ (WebKit::ChildProcessProxy::sendMessage): Deleted. >+ (WebKit::ChildProcessProxy::addMessageReceiver): Deleted. >+ (WebKit::ChildProcessProxy::removeMessageReceiver): Deleted. >+ (WebKit::ChildProcessProxy::dispatchMessage): Deleted. >+ (WebKit::ChildProcessProxy::dispatchSyncMessage): Deleted. >+ (WebKit::ChildProcessProxy::didFinishLaunching): Deleted. >+ (WebKit::ChildProcessProxy::shutDownProcess): Deleted. >+ (WebKit::ChildProcessProxy::setProcessSuppressionEnabled): Deleted. >+ (WebKit::ChildProcessProxy::connectionWillOpen): Deleted. >+ * UIProcess/AuxiliaryProcessProxy.h: Copied from Source/WebKit/UIProcess/ChildProcessProxy.h. >+ (WebKit::AuxiliaryProcessProxy::send): >+ (WebKit::AuxiliaryProcessProxy::sendSync): >+ (WebKit::AuxiliaryProcessProxy::sendWithAsyncReply): >+ (WebKit::ChildProcessProxy::send): Deleted. >+ (WebKit::ChildProcessProxy::sendSync): Deleted. >+ (WebKit::ChildProcessProxy::connection const): Deleted. >+ (WebKit::ChildProcessProxy::hasConnection const): Deleted. >+ (WebKit::ChildProcessProxy::processIdentifier const): Deleted. >+ (WebKit::ChildProcessProxy::canSendMessage const): Deleted. >+ (WebKit::ChildProcessProxy::coreProcessIdentifier const): Deleted. >+ (WebKit::ChildProcessProxy::platformGetLaunchOptions): Deleted. >+ (WebKit::ChildProcessProxy::sendWithAsyncReply): Deleted. >+ * UIProcess/ChildProcessProxy.cpp: Removed. >+ * UIProcess/ChildProcessProxy.h: Removed. >+ * UIProcess/Downloads/DownloadProxyMap.cpp: >+ (WebKit::DownloadProxyMap::DownloadProxyMap): >+ * UIProcess/Downloads/DownloadProxyMap.h: >+ * UIProcess/Network/NetworkProcessProxy.cpp: >+ (WebKit::NetworkProcessProxy::NetworkProcessProxy): >+ (WebKit::NetworkProcessProxy::getLaunchOptions): >+ (WebKit::NetworkProcessProxy::createDownloadProxy): >+ (WebKit::NetworkProcessProxy::didFinishLaunching): >+ * UIProcess/Network/NetworkProcessProxy.h: >+ * UIProcess/Plugins/PluginProcessProxy.cpp: >+ (WebKit::PluginProcessProxy::getLaunchOptions): >+ (WebKit::PluginProcessProxy::sendMemoryPressureEvent): >+ * UIProcess/Plugins/PluginProcessProxy.h: >+ * UIProcess/ServiceWorkerProcessProxy.h: >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::finishAttachingToWebProcess): >+ * UIProcess/WebProcessPool.cpp: >+ (WebKit::WebProcessPool::sendMemoryPressureEvent): >+ (WebKit::WebProcessPool::registerURLSchemeServiceWorkersCanHandle): >+ * UIProcess/WebProcessProxy.cpp: >+ (WebKit::WebProcessProxy::WebProcessProxy): >+ (WebKit::WebProcessProxy::getLaunchOptions): >+ (WebKit::WebProcessProxy::didFinishLaunching): >+ (WebKit::WebProcessProxy::maybeShutDown): >+ (WebKit::WebProcessProxy::canTerminateAuxiliaryProcess): >+ (WebKit::WebProcessProxy::shouldTerminate): >+ (WebKit::WebProcessProxy::requestTermination): >+ (WebKit::WebProcessProxy::canTerminateChildProcess): Deleted. >+ * UIProcess/WebProcessProxy.h: >+ * UnifiedSources-input.xcfilelist: >+ * WebKit.xcodeproj/project.pbxproj: >+ * WebProcess/WebProcess.cpp: >+ (WebKit::WebProcess::initializeProcess): >+ (WebKit::WebProcess::initializeConnection): >+ (WebKit::WebProcess::terminate): >+ (WebKit::WebProcess::didReceiveMessage): >+ (WebKit::WebProcess::initializeProcessName): >+ (WebKit::WebProcess::initializeSandbox): >+ (WebKit::WebProcess::platformInitializeProcess): >+ * WebProcess/WebProcess.h: >+ * WebProcess/WebProcessSupplement.h: >+ * WebProcess/cocoa/WebProcessCocoa.mm: >+ (WebKit::WebProcess::initializeProcessName): >+ (WebKit::WebProcess::platformInitializeProcess): >+ (WebKit::WebProcess::stopRunLoop): >+ (WebKit::WebProcess::initializeSandbox): >+ * WebProcess/gtk/WebProcessMainGtk.cpp: >+ (WebKit::WebProcessMainUnix): >+ * WebProcess/win/WebProcessMainWin.cpp: >+ (WebKit::WebProcessMainWin): >+ * WebProcess/wpe/WebProcessMainWPE.cpp: >+ (WebKit::WebProcessMainUnix): >+ > 2019-01-28 Andy Estes <aestes@apple.com> > > [Cocoa] Add SPI to _WKUserContentExtensionStore to retrieve its underlying WKContentRuleListStore >Index: Source/WebKit/CMakeLists.txt >=================================================================== >--- Source/WebKit/CMakeLists.txt (revision 240589) >+++ Source/WebKit/CMakeLists.txt (working copy) >@@ -125,7 +125,7 @@ set(WebKit_MESSAGES_IN_FILES > PluginProcess/PluginProcess.messages.in > PluginProcess/WebProcessConnection.messages.in > >- Shared/ChildProcess.messages.in >+ Shared/AuxiliaryProcess.messages.in > Shared/WebConnection.messages.in > > Shared/Authentication/AuthenticationManager.messages.in >Index: Source/WebKit/DerivedSources-input.xcfilelist >=================================================================== >--- Source/WebKit/DerivedSources-input.xcfilelist (revision 240589) >+++ Source/WebKit/DerivedSources-input.xcfilelist (working copy) >@@ -53,7 +53,7 @@ $(PROJECT_DIR)/Scripts/webkit/model.py > $(PROJECT_DIR)/Scripts/webkit/parser.py > $(PROJECT_DIR)/Shared/API/Cocoa/RemoteObjectRegistry.messages.in > $(PROJECT_DIR)/Shared/Authentication/AuthenticationManager.messages.in >-$(PROJECT_DIR)/Shared/ChildProcess.messages.in >+$(PROJECT_DIR)/Shared/AuxiliaryProcess.messages.in > $(PROJECT_DIR)/Shared/Plugins/NPObjectMessageReceiver.messages.in > $(PROJECT_DIR)/Shared/WebConnection.messages.in > $(PROJECT_DIR)/Shared/WebPreferences.yaml >Index: Source/WebKit/DerivedSources-output.xcfilelist >=================================================================== >--- Source/WebKit/DerivedSources-output.xcfilelist (revision 240589) >+++ Source/WebKit/DerivedSources-output.xcfilelist (working copy) >@@ -7,10 +7,10 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/Web > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/AutomationFrontendDispatchers.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/AutomationProtocolObjects.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/AutomationProtocolObjects.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/AuxiliaryProcessMessageReceiver.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/AuxiliaryProcessMessages.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/CacheStorageEngineConnectionMessageReceiver.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/CacheStorageEngineConnectionMessages.h >-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/ChildProcessMessageReceiver.cpp >-$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/ChildProcessMessages.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/DownloadProxyMessageReceiver.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/DownloadProxyMessages.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/DrawingAreaMessageReceiver.cpp >Index: Source/WebKit/DerivedSources.make >=================================================================== >--- Source/WebKit/DerivedSources.make (revision 240589) >+++ Source/WebKit/DerivedSources.make (working copy) >@@ -95,8 +95,8 @@ endif > > MESSAGE_RECEIVERS = \ > AuthenticationManager \ >+ AuxiliaryProcess \ > CacheStorageEngineConnection \ >- ChildProcess \ > DownloadProxy \ > DrawingArea \ > DrawingAreaProxy \ >Index: Source/WebKit/PlatformGTK.cmake >=================================================================== >--- Source/WebKit/PlatformGTK.cmake (revision 240589) >+++ Source/WebKit/PlatformGTK.cmake (working copy) >@@ -583,8 +583,8 @@ if (ENABLE_PLUGIN_PROCESS_GTK2) > PluginProcess/unix/PluginProcessUnix.cpp > > Shared/ActivityAssertion.cpp >+ Shared/AuxiliaryProcess.cpp > Shared/BlobDataFileReferenceWithSandboxExtension.cpp >- Shared/ChildProcess.cpp > Shared/ShareableBitmap.cpp > Shared/WebCoreArgumentCoders.cpp > Shared/WebEvent.cpp >@@ -619,7 +619,7 @@ if (ENABLE_PLUGIN_PROCESS_GTK2) > > Shared/soup/WebCoreArgumentCodersSoup.cpp > >- Shared/unix/ChildProcessMain.cpp >+ Shared/unix/AuxiliaryProcessMain.cpp > > UIProcess/Launcher/ProcessLauncher.cpp > >@@ -640,11 +640,11 @@ if (ENABLE_PLUGIN_PROCESS_GTK2) > WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp > WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp > >+ ${DERIVED_SOURCES_WEBKIT_DIR}/AuxiliaryProcessMessageReceiver.cpp > ${DERIVED_SOURCES_WEBKIT_DIR}/PluginControllerProxyMessageReceiver.cpp > ${DERIVED_SOURCES_WEBKIT_DIR}/PluginProcessMessageReceiver.cpp >- ${DERIVED_SOURCES_WEBKIT_DIR}/WebProcessConnectionMessageReceiver.cpp > ${DERIVED_SOURCES_WEBKIT_DIR}/NPObjectMessageReceiverMessageReceiver.cpp >- ${DERIVED_SOURCES_WEBKIT_DIR}/ChildProcessMessageReceiver.cpp >+ ${DERIVED_SOURCES_WEBKIT_DIR}/WebProcessConnectionMessageReceiver.cpp > ) > > add_executable(WebKitPluginProcess2 ${PluginProcessGTK2_SOURCES}) >Index: Source/WebKit/PlatformMac.cmake >=================================================================== >--- Source/WebKit/PlatformMac.cmake (revision 240589) >+++ Source/WebKit/PlatformMac.cmake (working copy) >@@ -100,7 +100,7 @@ list(APPEND WebKit_SOURCES > > Shared/Cocoa/APIDataCocoa.mm > Shared/Cocoa/APIObject.mm >- Shared/Cocoa/ChildProcessCocoa.mm >+ Shared/Cocoa/AuxiliaryProcessCocoa.mm > Shared/Cocoa/CompletionHandlerCallChecker.mm > Shared/Cocoa/DataDetectionResult.mm > Shared/Cocoa/LoadParametersCocoa.mm >@@ -135,7 +135,7 @@ list(APPEND WebKit_SOURCES > > Shared/mac/ArgumentCodersMac.mm > Shared/mac/AttributedString.mm >- Shared/mac/ChildProcessMac.mm >+ Shared/mac/AuxiliaryProcessMac.mm > Shared/mac/CodeSigning.mm > Shared/mac/ColorSpaceData.mm > Shared/mac/HangDetectionDisablerMac.mm >Index: Source/WebKit/PlatformWin.cmake >=================================================================== >--- Source/WebKit/PlatformWin.cmake (revision 240589) >+++ Source/WebKit/PlatformWin.cmake (working copy) >@@ -26,7 +26,7 @@ list(APPEND WebKit_SOURCES > > Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp > >- Shared/win/ChildProcessMainWin.cpp >+ Shared/win/AuxiliaryProcessMainWin.cpp > Shared/win/NativeWebKeyboardEventWin.cpp > Shared/win/NativeWebMouseEventWin.cpp > Shared/win/NativeWebTouchEventWin.cpp >Index: Source/WebKit/Sources.txt >=================================================================== >--- Source/WebKit/Sources.txt (revision 240589) >+++ Source/WebKit/Sources.txt (working copy) >@@ -100,9 +100,9 @@ PluginProcess/WebProcessConnection.cpp @ > // TODO: The files here marked @no-unify should be unified once GTK's PluginProcess2 is removed. > Shared/ActivityAssertion.cpp @no-unify > Shared/AsyncRequest.cpp >+Shared/AuxiliaryProcess.cpp @no-unify > Shared/BlobDataFileReferenceWithSandboxExtension.cpp @no-unify > Shared/CacheModel.cpp >-Shared/ChildProcess.cpp @no-unify > Shared/ContextMenuContextData.cpp > Shared/EditorState.cpp > Shared/FontInfo.cpp >@@ -219,8 +219,8 @@ Shared/Plugins/Netscape/PluginInformatio > > Shared/WebsiteData/WebsiteData.cpp > >+UIProcess/AuxiliaryProcessProxy.cpp > UIProcess/BackgroundProcessResponsivenessTimer.cpp >-UIProcess/ChildProcessProxy.cpp > UIProcess/DeviceIdHashSaltStorage.cpp > UIProcess/DrawingAreaProxy.cpp > UIProcess/FrameLoadState.cpp >Index: Source/WebKit/SourcesCocoa.txt >=================================================================== >--- Source/WebKit/SourcesCocoa.txt (revision 240589) >+++ Source/WebKit/SourcesCocoa.txt (working copy) >@@ -128,7 +128,7 @@ Shared/Authentication/cocoa/ClientCertif > Shared/Cocoa/APIDataCocoa.mm > Shared/Cocoa/APIObject.mm > Shared/Cocoa/ArgumentCodersCocoa.mm >-Shared/Cocoa/ChildProcessCocoa.mm >+Shared/Cocoa/AuxiliaryProcessCocoa.mm > Shared/Cocoa/CompletionHandlerCallChecker.mm > Shared/Cocoa/DataDetectionResult.mm > Shared/Cocoa/LoadParametersCocoa.mm >@@ -150,7 +150,7 @@ Shared/Cocoa/WKObject.mm > Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm > Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm > >-Shared/ios/ChildProcessIOS.mm >+Shared/ios/AuxiliaryProcessIOS.mm > Shared/ios/InteractionInformationAtPosition.mm > Shared/ios/InteractionInformationRequest.cpp > Shared/ios/NativeWebKeyboardEventIOS.mm >@@ -164,7 +164,7 @@ Shared/ios/WebTouchEventIOS.cpp > > Shared/mac/ArgumentCodersMac.mm > Shared/mac/AttributedString.mm >-Shared/mac/ChildProcessMac.mm >+Shared/mac/AuxiliaryProcessMac.mm > Shared/mac/CodeSigning.mm > Shared/mac/ColorSpaceData.mm > Shared/mac/HangDetectionDisablerMac.mm >Index: Source/WebKit/SourcesGTK.txt >=================================================================== >--- Source/WebKit/SourcesGTK.txt (revision 240589) >+++ Source/WebKit/SourcesGTK.txt (working copy) >@@ -105,7 +105,7 @@ Shared/linux/WebMemorySamplerLinux.cpp > Shared/soup/WebCoreArgumentCodersSoup.cpp @no-unify > Shared/soup/WebErrorsSoup.cpp > >-Shared/unix/ChildProcessMain.cpp @no-unify >+Shared/unix/AuxiliaryProcessMain.cpp @no-unify > > UIProcess/AcceleratedDrawingAreaProxy.cpp > UIProcess/BackingStore.cpp >Index: Source/WebKit/SourcesWPE.txt >=================================================================== >--- Source/WebKit/SourcesWPE.txt (revision 240589) >+++ Source/WebKit/SourcesWPE.txt (working copy) >@@ -96,7 +96,7 @@ Shared/linux/WebMemorySamplerLinux.cpp > Shared/soup/WebCoreArgumentCodersSoup.cpp > Shared/soup/WebErrorsSoup.cpp > >-Shared/unix/ChildProcessMain.cpp >+Shared/unix/AuxiliaryProcessMain.cpp > > UIProcess/AcceleratedDrawingAreaProxy.cpp > UIProcess/DefaultUndoController.cpp >Index: Source/WebKit/UnifiedSources-input.xcfilelist >=================================================================== >--- Source/WebKit/UnifiedSources-input.xcfilelist (revision 240589) >+++ Source/WebKit/UnifiedSources-input.xcfilelist (working copy) >@@ -169,13 +169,13 @@ $(SRCROOT)/Shared/AsyncRequest.cpp > $(SRCROOT)/Shared/Authentication/AuthenticationManager.cpp > $(SRCROOT)/Shared/Authentication/cocoa/AuthenticationManagerCocoa.mm > $(SRCROOT)/Shared/Authentication/cocoa/ClientCertificateAuthenticationXPCConstants.cpp >+$(SRCROOT)/Shared/AuxiliaryProcess.cpp > $(SRCROOT)/Shared/BlobDataFileReferenceWithSandboxExtension.cpp > $(SRCROOT)/Shared/CacheModel.cpp >-$(SRCROOT)/Shared/ChildProcess.cpp > $(SRCROOT)/Shared/Cocoa/APIDataCocoa.mm > $(SRCROOT)/Shared/Cocoa/APIObject.mm > $(SRCROOT)/Shared/Cocoa/ArgumentCodersCocoa.mm >-$(SRCROOT)/Shared/Cocoa/ChildProcessCocoa.mm >+$(SRCROOT)/Shared/Cocoa/AuxiliaryProcessCocoa.mm > $(SRCROOT)/Shared/Cocoa/CompletionHandlerCallChecker.mm > $(SRCROOT)/Shared/Cocoa/DataDetectionResult.mm > $(SRCROOT)/Shared/Cocoa/LoadParametersCocoa.mm >@@ -279,7 +279,7 @@ $(SRCROOT)/Shared/WebsitePoliciesData.cp > $(SRCROOT)/Shared/cf/ArgumentCodersCF.cpp > $(SRCROOT)/Shared/cf/CookieStorageUtilsCF.mm > $(SRCROOT)/Shared/cg/ShareableBitmapCG.cpp >-$(SRCROOT)/Shared/ios/ChildProcessIOS.mm >+$(SRCROOT)/Shared/ios/AuxiliaryProcessIOS.mm > $(SRCROOT)/Shared/ios/InteractionInformationAtPosition.mm > $(SRCROOT)/Shared/ios/InteractionInformationRequest.cpp > $(SRCROOT)/Shared/ios/NativeWebKeyboardEventIOS.mm >@@ -292,7 +292,7 @@ $(SRCROOT)/Shared/ios/WebPlatformTouchPo > $(SRCROOT)/Shared/ios/WebTouchEventIOS.cpp > $(SRCROOT)/Shared/mac/ArgumentCodersMac.mm > $(SRCROOT)/Shared/mac/AttributedString.mm >-$(SRCROOT)/Shared/mac/ChildProcessMac.mm >+$(SRCROOT)/Shared/mac/AuxiliaryProcessMac.mm > $(SRCROOT)/Shared/mac/CodeSigning.mm > $(SRCROOT)/Shared/mac/ColorSpaceData.mm > $(SRCROOT)/Shared/mac/HangDetectionDisablerMac.mm >@@ -480,8 +480,8 @@ $(SRCROOT)/UIProcess/Automation/WebAutom > $(SRCROOT)/UIProcess/Automation/cocoa/WebAutomationSessionCocoa.mm > $(SRCROOT)/UIProcess/Automation/ios/WebAutomationSessionIOS.mm > $(SRCROOT)/UIProcess/Automation/mac/WebAutomationSessionMac.mm >+$(SRCROOT)/UIProcess/AuxiliaryProcessProxy.cpp > $(SRCROOT)/UIProcess/BackgroundProcessResponsivenessTimer.cpp >-$(SRCROOT)/UIProcess/ChildProcessProxy.cpp > $(SRCROOT)/UIProcess/Cocoa/AutomationClient.mm > $(SRCROOT)/UIProcess/Cocoa/AutomationSessionClient.mm > $(SRCROOT)/UIProcess/Cocoa/DiagnosticLoggingClient.mm >Index: Source/WebKit/NetworkProcess/NetworkProcess.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcess.cpp (revision 240589) >+++ Source/WebKit/NetworkProcess/NetworkProcess.cpp (working copy) >@@ -30,7 +30,7 @@ > #include "ArgumentCoders.h" > #include "Attachment.h" > #include "AuthenticationManager.h" >-#include "ChildProcessMessages.h" >+#include "AuxiliaryProcessMessages.h" > #include "DataReference.h" > #include "DownloadProxyMessages.h" > #if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER) >@@ -115,7 +115,7 @@ static void callExitSoon(IPC::Connection > // the process will exit forcibly. > auto watchdogDelay = 10_s; > >- WorkQueue::create("com.apple.WebKit.ChildProcess.WatchDogQueue")->dispatchAfter(watchdogDelay, [] { >+ WorkQueue::create("com.apple.WebKit.NetworkProcess.WatchDogQueue")->dispatchAfter(watchdogDelay, [] { > // We use _exit here since the watchdog callback is called from another thread and we don't want > // global destructors or atexit handlers to be called from this thread while the main thread is busy > // doing its thing. >@@ -124,7 +124,7 @@ static void callExitSoon(IPC::Connection > }); > } > >-NetworkProcess::NetworkProcess(ChildProcessInitializationParameters&& parameters) >+NetworkProcess::NetworkProcess(AuxiliaryProcessInitializationParameters&& parameters) > : m_downloadManager(*this) > #if ENABLE(CONTENT_EXTENSIONS) > , m_networkContentRuleListManager(*this) >@@ -203,8 +203,8 @@ void NetworkProcess::didReceiveMessage(I > if (messageReceiverMap().dispatchMessage(connection, decoder)) > return; > >- if (decoder.messageReceiverName() == Messages::ChildProcess::messageReceiverName()) { >- ChildProcess::didReceiveMessage(connection, decoder); >+ if (decoder.messageReceiverName() == Messages::AuxiliaryProcess::messageReceiverName()) { >+ AuxiliaryProcess::didReceiveMessage(connection, decoder); > return; > } > >@@ -359,7 +359,7 @@ void NetworkProcess::initializeNetworkPr > > void NetworkProcess::initializeConnection(IPC::Connection* connection) > { >- ChildProcess::initializeConnection(connection); >+ AuxiliaryProcess::initializeConnection(connection); > > // We give a chance for didClose() to get called on the main thread but forcefully call _exit() after a delay > // in case the main thread is unresponsive or didClose() takes too long. >@@ -1804,7 +1804,7 @@ void NetworkProcess::logDiagnosticMessag > void NetworkProcess::terminate() > { > platformTerminate(); >- ChildProcess::terminate(); >+ AuxiliaryProcess::terminate(); > } > > void NetworkProcess::processDidTransitionToForeground() >@@ -2262,15 +2262,15 @@ void NetworkProcess::requestCacheStorage > } > > #if !PLATFORM(COCOA) >-void NetworkProcess::initializeProcess(const ChildProcessInitializationParameters&) >+void NetworkProcess::initializeProcess(const AuxiliaryProcessInitializationParameters&) > { > } > >-void NetworkProcess::initializeProcessName(const ChildProcessInitializationParameters&) >+void NetworkProcess::initializeProcessName(const AuxiliaryProcessInitializationParameters&) > { > } > >-void NetworkProcess::initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&) >+void NetworkProcess::initializeSandbox(const AuxiliaryProcessInitializationParameters&, SandboxInitializationParameters&) > { > } > >Index: Source/WebKit/NetworkProcess/NetworkProcess.h >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcess.h (revision 240589) >+++ Source/WebKit/NetworkProcess/NetworkProcess.h (working copy) >@@ -25,8 +25,8 @@ > > #pragma once > >+#include "AuxiliaryProcess.h" > #include "CacheModel.h" >-#include "ChildProcess.h" > #include "DownloadManager.h" > #include "NetworkContentRuleListManager.h" > #include "NetworkHTTPSUpgradeChecker.h" >@@ -100,7 +100,7 @@ namespace NetworkCache { > class Cache; > } > >-class NetworkProcess : public ChildProcess, private DownloadManager::Client, public ThreadSafeRefCounted<NetworkProcess> >+class NetworkProcess : public AuxiliaryProcess, private DownloadManager::Client, public ThreadSafeRefCounted<NetworkProcess> > #if ENABLE(INDEXED_DATABASE) > , public WebCore::IDBServer::IDBBackingStoreTemporaryFileHandler > #endif >@@ -108,7 +108,7 @@ class NetworkProcess : public ChildProce > { > WTF_MAKE_NONCOPYABLE(NetworkProcess); > public: >- NetworkProcess(ChildProcessInitializationParameters&&); >+ NetworkProcess(AuxiliaryProcessInitializationParameters&&); > ~NetworkProcess(); > static constexpr ProcessType processType = ProcessType::Network; > >@@ -309,10 +309,10 @@ private: > void platformPrepareToSuspend(CompletionHandler<void()>&&); > void platformProcessDidResume(); > >- // ChildProcess >- void initializeProcess(const ChildProcessInitializationParameters&) override; >- void initializeProcessName(const ChildProcessInitializationParameters&) override; >- void initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&) override; >+ // AuxiliaryProcess >+ void initializeProcess(const AuxiliaryProcessInitializationParameters&) override; >+ void initializeProcessName(const AuxiliaryProcessInitializationParameters&) override; >+ void initializeSandbox(const AuxiliaryProcessInitializationParameters&, SandboxInitializationParameters&) override; > void initializeConnection(IPC::Connection*) override; > bool shouldTerminate() override; > >Index: Source/WebKit/NetworkProcess/NetworkProcessSupplement.h >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcessSupplement.h (revision 240589) >+++ Source/WebKit/NetworkProcess/NetworkProcessSupplement.h (working copy) >@@ -23,16 +23,15 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef NetworkProcessSupplement_h >-#define NetworkProcessSupplement_h >+#pragma once > >-#include "ChildProcessSupplement.h" >+#include "AuxiliaryProcessSupplement.h" > > namespace WebKit { > > struct NetworkProcessCreationParameters; > >-class NetworkProcessSupplement : public ChildProcessSupplement { >+class NetworkProcessSupplement : public AuxiliaryProcessSupplement { > public: > virtual void initialize(const NetworkProcessCreationParameters&) > { >@@ -40,5 +39,3 @@ public: > }; > > } // namespace WebKit >- >-#endif // NetworkProcessSupplement_h >Index: Source/WebKit/NetworkProcess/Cookies/WebCookieManager.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/Cookies/WebCookieManager.cpp (revision 240589) >+++ Source/WebKit/NetworkProcess/Cookies/WebCookieManager.cpp (working copy) >@@ -26,7 +26,6 @@ > #include "config.h" > #include "WebCookieManager.h" > >-#include "ChildProcess.h" > #include "WebCookieManagerMessages.h" > #include "WebCookieManagerProxyMessages.h" > #include "WebCoreArgumentCoders.h" >Index: Source/WebKit/NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp (revision 240589) >+++ Source/WebKit/NetworkProcess/Cookies/soup/WebCookieManagerSoup.cpp (working copy) >@@ -26,7 +26,6 @@ > #include "config.h" > #include "WebCookieManager.h" > >-#include "ChildProcess.h" > #include "NetworkProcess.h" > #include <WebCore/NetworkStorageSession.h> > #include <WebCore/SoupNetworkSession.h> >Index: Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm >=================================================================== >--- Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm (revision 240589) >+++ Source/WebKit/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm (working copy) >@@ -41,7 +41,7 @@ public: > }; > > template<> >-void initializeChildProcess<NetworkProcess>(ChildProcessInitializationParameters&& parameters) >+void initializeAuxiliaryProcess<NetworkProcess>(AuxiliaryProcessInitializationParameters&& parameters) > { > static NeverDestroyed<NetworkProcess> networkProcess(WTFMove(parameters)); > } >Index: Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp (revision 240589) >+++ Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp (working copy) >@@ -26,7 +26,7 @@ > #include "config.h" > #include "NetworkCacheStorage.h" > >-#include "ChildProcess.h" >+#include "AuxiliaryProcess.h" > #include "Logging.h" > #include "NetworkCacheCoders.h" > #include "NetworkCacheFileSystem.h" >@@ -1133,7 +1133,7 @@ void Storage::deleteOldVersions() > if (directoryVersion >= version) > return; > #if PLATFORM(MAC) >- if (!ChildProcess::isSystemWebKit() && directoryVersion == lastStableVersion) >+ if (!AuxiliaryProcess::isSystemWebKit() && directoryVersion == lastStableVersion) > return; > #endif > >Index: Source/WebKit/NetworkProcess/ios/NetworkProcessIOS.mm >=================================================================== >--- Source/WebKit/NetworkProcess/ios/NetworkProcessIOS.mm (revision 240589) >+++ Source/WebKit/NetworkProcess/ios/NetworkProcessIOS.mm (working copy) >@@ -44,24 +44,24 @@ > namespace WebKit { > using namespace WebCore; > >-void NetworkProcess::initializeProcess(const ChildProcessInitializationParameters&) >+void NetworkProcess::initializeProcess(const AuxiliaryProcessInitializationParameters&) > { > InitWebCoreThreadSystemInterface(); > } > >-void NetworkProcess::initializeProcessName(const ChildProcessInitializationParameters&) >+void NetworkProcess::initializeProcessName(const AuxiliaryProcessInitializationParameters&) > { > notImplemented(); > } > >-void NetworkProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >+void NetworkProcess::initializeSandbox(const AuxiliaryProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) > { > #if ENABLE_MANUAL_NETWORK_SANDBOXING > // Need to override the default, because service has a different bundle ID. > NSBundle *webkit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")]; > sandboxParameters.setOverrideSandboxProfilePath([webkit2Bundle pathForResource:@"com.apple.WebKit.NetworkProcess" ofType:@"sb"]); > >- ChildProcess::initializeSandbox(parameters, sandboxParameters); >+ AuxiliaryProcess::initializeSandbox(parameters, sandboxParameters); > #else > UNUSED_PARAM(parameters); > UNUSED_PARAM(sandboxParameters); >Index: Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm >=================================================================== >--- Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm (revision 240589) >+++ Source/WebKit/NetworkProcess/mac/NetworkProcessMac.mm (working copy) >@@ -51,7 +51,7 @@ > namespace WebKit { > using namespace WebCore; > >-void NetworkProcess::initializeProcess(const ChildProcessInitializationParameters&) >+void NetworkProcess::initializeProcess(const AuxiliaryProcessInitializationParameters&) > { > #if PLATFORM(MAC) && !PLATFORM(IOSMAC) > // Having a window server connection in this process would result in spin logs (<rdar://problem/13239119>). >@@ -62,7 +62,7 @@ void NetworkProcess::initializeProcess(c > launchServicesCheckIn(); > } > >-void NetworkProcess::initializeProcessName(const ChildProcessInitializationParameters& parameters) >+void NetworkProcess::initializeProcessName(const AuxiliaryProcessInitializationParameters& parameters) > { > #if !PLATFORM(IOSMAC) > NSString *applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ Networking", "visible name of the network process. The argument is the application name."), (NSString *)parameters.uiProcessName]; >@@ -85,7 +85,7 @@ void NetworkProcess::allowSpecificHTTPSC > [NSURLRequest setAllowsSpecificHTTPSCertificate:(__bridge NSArray *)certificateInfo.certificateChain() forHost:(NSString *)host]; > } > >-void NetworkProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >+void NetworkProcess::initializeSandbox(const AuxiliaryProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) > { > // Need to overide the default, because service has a different bundle ID. > #if WK_API_ENABLED >@@ -96,7 +96,7 @@ void NetworkProcess::initializeSandbox(c > > sandboxParameters.setOverrideSandboxProfilePath([webKit2Bundle pathForResource:@"com.apple.WebKit.NetworkProcess" ofType:@"sb"]); > >- ChildProcess::initializeSandbox(parameters, sandboxParameters); >+ AuxiliaryProcess::initializeSandbox(parameters, sandboxParameters); > } > > void NetworkProcess::clearCacheForAllOrigins(uint32_t cachesToClear) >Index: Source/WebKit/NetworkProcess/soup/NetworkProcessMainSoup.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/soup/NetworkProcessMainSoup.cpp (revision 240589) >+++ Source/WebKit/NetworkProcess/soup/NetworkProcessMainSoup.cpp (working copy) >@@ -27,7 +27,7 @@ > #include "config.h" > #include "NetworkProcess.h" > >-#include "ChildProcessMain.h" >+#include "AuxiliaryProcessMain.h" > #include "NetworkProcessMainUnix.h" > #include <WebCore/NetworkStorageSession.h> > >@@ -35,7 +35,7 @@ namespace WebKit { > > static RefPtr<NetworkProcess> globalNetworkProcess; > >-class NetworkProcessMain final: public ChildProcessMainBase { >+class NetworkProcessMain final: public AuxiliaryProcessMainBase { > public: > void platformFinalize() override > { >@@ -46,7 +46,7 @@ public: > }; > > template<> >-void initializeChildProcess<NetworkProcess>(ChildProcessInitializationParameters&& parameters) >+void initializeAuxiliaryProcess<NetworkProcess>(AuxiliaryProcessInitializationParameters&& parameters) > { > static NeverDestroyed<NetworkProcess> networkProcess(WTFMove(parameters)); > globalNetworkProcess = &networkProcess.get(); >@@ -54,7 +54,7 @@ void initializeChildProcess<NetworkProce > > int NetworkProcessMainUnix(int argc, char** argv) > { >- return ChildProcessMain<NetworkProcess, NetworkProcessMain>(argc, argv); >+ return AuxiliaryProcessMain<NetworkProcess, NetworkProcessMain>(argc, argv); > } > > } // namespace WebKit >Index: Source/WebKit/NetworkProcess/watchos/NetworkProximityManager.h >=================================================================== >--- Source/WebKit/NetworkProcess/watchos/NetworkProximityManager.h (revision 240589) >+++ Source/WebKit/NetworkProcess/watchos/NetworkProximityManager.h (working copy) >@@ -46,7 +46,7 @@ class ResourceRequest; > > namespace WebKit { > >-class ChildProcess; >+class NetworkProcess; > class NetworkDataTaskCocoa; > enum class NetworkProximityRecommendation : uint8_t; > >@@ -70,7 +70,7 @@ class NetworkProximityManager final : pu > WTF_MAKE_FAST_ALLOCATED; > WTF_MAKE_NONCOPYABLE(NetworkProximityManager); > public: >- explicit NetworkProximityManager(ChildProcess&); >+ explicit NetworkProximityManager(NetworkProcess&); > ~NetworkProximityManager(); > > static const char* supplementName(); >Index: Source/WebKit/NetworkProcess/watchos/NetworkProximityManager.mm >=================================================================== >--- Source/WebKit/NetworkProcess/watchos/NetworkProximityManager.mm (revision 240589) >+++ Source/WebKit/NetworkProcess/watchos/NetworkProximityManager.mm (working copy) >@@ -30,6 +30,7 @@ > > #import "Logging.h" > #import "NetworkDataTaskCocoa.h" >+#import "NetworkProcess.h" > #import "NetworkProcessCreationParameters.h" > #import <IDS/IDS.h> > #import <WirelessCoexManager/WRM_iRATInterface.h> >@@ -77,7 +78,7 @@ enum class NetworkProximityRecommendatio > WiFi, > }; > >-NetworkProximityManager::NetworkProximityManager(ChildProcess&) >+NetworkProximityManager::NetworkProximityManager(NetworkProcess&) > : m_idsService { adoptNS([[IDSService alloc] initWithService:@"com.apple.private.alloy.webkitnetworking"]) } > , m_idsServiceDelegate { adoptNS([[WKProximityServiceDelegate alloc] init]) } > , m_recommendationQueue { adoptOSObject(dispatch_queue_create("WebKit Network Proximity Recommendation Queue", DISPATCH_QUEUE_SERIAL)) } >Index: Source/WebKit/NetworkProcess/win/NetworkProcessMainWin.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/win/NetworkProcessMainWin.cpp (revision 240589) >+++ Source/WebKit/NetworkProcess/win/NetworkProcessMainWin.cpp (working copy) >@@ -26,20 +26,20 @@ > #include "config.h" > #include "NetworkProcessMainWin.h" > >-#include "ChildProcessMain.h" >+#include "AuxiliaryProcessMain.h" > #include "NetworkProcess.h" > > namespace WebKit { > > template<> >-void initializeChildProcess<NetworkProcess>(ChildProcessInitializationParameters&& parameters) >+void initializeAuxiliaryProcess<NetworkProcess>(AuxiliaryProcessInitializationParameters&& parameters) > { > static NeverDestroyed<NetworkProcess> networkProcess(WTFMove(parameters)); > } > > int NetworkProcessMainWin(int argc, char** argv) > { >- return ChildProcessMain<NetworkProcess, ChildProcessMainBase>(argc, argv); >+ return AuxiliaryProcessMain<NetworkProcess, AuxiliaryProcessMainBase>(argc, argv); > } > > } // namespace WebKit >Index: Source/WebKit/PluginProcess/PluginProcess.cpp >=================================================================== >--- Source/WebKit/PluginProcess/PluginProcess.cpp (revision 240589) >+++ Source/WebKit/PluginProcess/PluginProcess.cpp (working copy) >@@ -30,7 +30,7 @@ > > #include "ArgumentCoders.h" > #include "Attachment.h" >-#include "ChildProcessMessages.h" >+#include "AuxiliaryProcessMessages.h" > #include "NetscapePlugin.h" > #include "NetscapePluginModule.h" > #include "PluginProcessConnectionMessages.h" >@@ -76,7 +76,7 @@ PluginProcess::~PluginProcess() > { > } > >-void PluginProcess::initializeProcess(const ChildProcessInitializationParameters& parameters) >+void PluginProcess::initializeProcess(const AuxiliaryProcessInitializationParameters& parameters) > { > WTF::setProcessPrivileges(allPrivileges()); > WebCore::NetworkStorageSession::permitProcessToUseCookieAPI(true); >@@ -86,10 +86,10 @@ void PluginProcess::initializeProcess(co > > void PluginProcess::initializeConnection(IPC::Connection* connection) > { >- ChildProcess::initializeConnection(connection); >+ AuxiliaryProcess::initializeConnection(connection); > > // We call _exit() directly from the background queue in case the main thread is unresponsive >- // and ChildProcess::didClose() does not get called. >+ // and AuxiliaryProcess::didClose() does not get called. > connection->setDidCloseOnConnectionWorkQueueCallback(callExit); > } > >@@ -133,8 +133,8 @@ bool PluginProcess::shouldTerminate() > void PluginProcess::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder) > { > #if OS(LINUX) >- if (decoder.messageReceiverName() == Messages::ChildProcess::messageReceiverName()) { >- ChildProcess::didReceiveMessage(connection, decoder); >+ if (decoder.messageReceiverName() == Messages::AuxiliaryProcess::messageReceiverName()) { >+ AuxiliaryProcess::didReceiveMessage(connection, decoder); > return; > } > #endif >@@ -253,11 +253,11 @@ void PluginProcess::minimumLifetimeTimer > } > > #if !PLATFORM(COCOA) >-void PluginProcess::initializeProcessName(const ChildProcessInitializationParameters&) >+void PluginProcess::initializeProcessName(const AuxiliaryProcessInitializationParameters&) > { > } > >-void PluginProcess::initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&) >+void PluginProcess::initializeSandbox(const AuxiliaryProcessInitializationParameters&, SandboxInitializationParameters&) > { > } > #endif >Index: Source/WebKit/PluginProcess/PluginProcess.h >=================================================================== >--- Source/WebKit/PluginProcess/PluginProcess.h (revision 240589) >+++ Source/WebKit/PluginProcess/PluginProcess.h (working copy) >@@ -27,7 +27,7 @@ > > #if ENABLE(NETSCAPE_PLUGIN_API) > >-#include "ChildProcess.h" >+#include "AuxiliaryProcess.h" > #include <WebCore/CountedUserActivity.h> > #include <wtf/Forward.h> > #include <wtf/text/WTFString.h> >@@ -42,7 +42,7 @@ class NetscapePluginModule; > class WebProcessConnection; > struct PluginProcessCreationParameters; > >-class PluginProcess : public ChildProcess >+class PluginProcess : public AuxiliaryProcess > { > WTF_MAKE_NONCOPYABLE(PluginProcess); > friend NeverDestroyed<PluginProcess>; >@@ -79,13 +79,13 @@ private: > bool shouldOverrideQuarantine() final; > #endif > >- // ChildProcess >- void initializeProcess(const ChildProcessInitializationParameters&) override; >- void initializeProcessName(const ChildProcessInitializationParameters&) override; >+ // AuxiliaryProcess >+ void initializeProcess(const AuxiliaryProcessInitializationParameters&) override; >+ void initializeProcessName(const AuxiliaryProcessInitializationParameters&) override; > void initializeConnection(IPC::Connection*) override; >- void initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&) override; >+ void initializeSandbox(const AuxiliaryProcessInitializationParameters&, SandboxInitializationParameters&) override; > bool shouldTerminate() override; >- void platformInitializeProcess(const ChildProcessInitializationParameters&); >+ void platformInitializeProcess(const AuxiliaryProcessInitializationParameters&); > > #if USE(APPKIT) > void stopRunLoop() override; >Index: Source/WebKit/PluginProcess/mac/PluginProcessMac.mm >=================================================================== >--- Source/WebKit/PluginProcess/mac/PluginProcessMac.mm (revision 240589) >+++ Source/WebKit/PluginProcess/mac/PluginProcessMac.mm (working copy) >@@ -525,7 +525,7 @@ void PluginProcess::platformInitializePl > #endif > } > >-void PluginProcess::platformInitializeProcess(const ChildProcessInitializationParameters& parameters) >+void PluginProcess::platformInitializeProcess(const AuxiliaryProcessInitializationParameters& parameters) > { > initializeShim(); > >@@ -623,7 +623,7 @@ void PluginProcess::platformInitializePr > } > } > >-void PluginProcess::initializeProcessName(const ChildProcessInitializationParameters& parameters) >+void PluginProcess::initializeProcessName(const AuxiliaryProcessInitializationParameters& parameters) > { > NSString *applicationName = [NSString stringWithFormat:WEB_UI_STRING("%@ (%@ Internet plug-in)", "visible name of the plug-in host process. The first argument is the plug-in name and the second argument is the application name."), [[(NSString *)m_pluginPath lastPathComponent] stringByDeletingPathExtension], (NSString *)parameters.uiProcessName]; > _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), _kLSDisplayNameKey, (CFStringRef)applicationName, nullptr); >@@ -631,7 +631,7 @@ void PluginProcess::initializeProcessNam > _LSSetApplicationInformationItem(kLSDefaultSessionID, _LSGetCurrentApplicationASN(), kLSPlugInBundleIdentifierKey, m_pluginBundleIdentifier.createCFString().get(), nullptr); > } > >-void PluginProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >+void PluginProcess::initializeSandbox(const AuxiliaryProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) > { > // PluginProcess may already be sandboxed if its parent process was sandboxed, and launched a child process instead of an XPC service. > // This is generally not expected, however we currently always spawn a child process to create a MIME type preferences file. >@@ -695,7 +695,7 @@ void PluginProcess::initializeSandbox(co > > [[NSUserDefaults standardUserDefaults] registerDefaults:@{ @"NSUseRemoteSavePanel" : @YES }]; > >- ChildProcess::initializeSandbox(parameters, sandboxParameters); >+ AuxiliaryProcess::initializeSandbox(parameters, sandboxParameters); > } > > bool PluginProcess::shouldOverrideQuarantine() >@@ -705,7 +705,7 @@ bool PluginProcess::shouldOverrideQuaran > > void PluginProcess::stopRunLoop() > { >- ChildProcess::stopNSAppRunLoop(); >+ AuxiliaryProcess::stopNSAppRunLoop(); > } > > } // namespace WebKit >Index: Source/WebKit/PluginProcess/unix/PluginProcessMainUnix.cpp >=================================================================== >--- Source/WebKit/PluginProcess/unix/PluginProcessMainUnix.cpp (revision 240589) >+++ Source/WebKit/PluginProcess/unix/PluginProcessMainUnix.cpp (working copy) >@@ -30,7 +30,7 @@ > > #if ENABLE(PLUGIN_PROCESS) > >-#include "ChildProcessMain.h" >+#include "AuxiliaryProcessMain.h" > #include "Logging.h" > #include "NetscapePlugin.h" > #include "PluginProcess.h" >@@ -53,7 +53,7 @@ namespace WebKit { > static LazyNeverDestroyed<WebCore::XErrorTrapper> xErrorTrapper; > #endif > >-class PluginProcessMain final: public ChildProcessMainBase { >+class PluginProcessMain final: public AuxiliaryProcessMainBase { > public: > bool platformInitialize() override > { >@@ -88,13 +88,13 @@ public: > #endif > > m_parameters.extraInitializationData.add("plugin-path", argv[3]); >- return ChildProcessMainBase::parseCommandLine(argc, argv); >+ return AuxiliaryProcessMainBase::parseCommandLine(argc, argv); > } > }; > > int PluginProcessMainUnix(int argc, char** argv) > { >- return ChildProcessMain<PluginProcess, PluginProcessMain>(argc, argv); >+ return AuxiliaryProcessMain<PluginProcess, PluginProcessMain>(argc, argv); > } > > } // namespace WebKit >Index: Source/WebKit/PluginProcess/unix/PluginProcessUnix.cpp >=================================================================== >--- Source/WebKit/PluginProcess/unix/PluginProcessUnix.cpp (revision 240589) >+++ Source/WebKit/PluginProcess/unix/PluginProcessUnix.cpp (working copy) >@@ -33,7 +33,7 @@ > > namespace WebKit { > >-void PluginProcess::platformInitializeProcess(const ChildProcessInitializationParameters&) >+void PluginProcess::platformInitializeProcess(const AuxiliaryProcessInitializationParameters&) > { > } > >Index: Source/WebKit/Shared/AuxiliaryProcess.cpp >=================================================================== >--- Source/WebKit/Shared/AuxiliaryProcess.cpp (revision 240589) (from Source/WebKit/Shared/ChildProcess.cpp:240589) >+++ Source/WebKit/Shared/AuxiliaryProcess.cpp (working copy) >@@ -0,0 +1,224 @@ >+/* >+ * Copyright (C) 2010 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. >+ */ >+ >+#include "config.h" >+#include "ChildProcess.h" >+ >+#include "Logging.h" >+#include "SandboxInitializationParameters.h" >+#include <WebCore/SchemeRegistry.h> >+#include <pal/SessionID.h> >+ >+#if !OS(WINDOWS) >+#include <unistd.h> >+#endif >+ >+#if OS(LINUX) >+#include <wtf/MemoryPressureHandler.h> >+#endif >+ >+namespace WebKit { >+using namespace WebCore; >+ >+ChildProcess::ChildProcess() >+ : m_terminationCounter(0) >+ , m_terminationTimer(RunLoop::main(), this, &ChildProcess::terminationTimerFired) >+ , m_processSuppressionDisabled("Process Suppression Disabled by UIProcess") >+{ >+} >+ >+ChildProcess::~ChildProcess() >+{ >+} >+ >+void ChildProcess::didClose(IPC::Connection&) >+{ >+ _exit(EXIT_SUCCESS); >+} >+ >+void ChildProcess::initialize(const ChildProcessInitializationParameters& parameters) >+{ >+ RELEASE_ASSERT_WITH_MESSAGE(parameters.processIdentifier, "Unable to initialize child process without a WebCore process identifier"); >+ Process::setIdentifier(*parameters.processIdentifier); >+ >+ platformInitialize(); >+ >+#if PLATFORM(COCOA) >+ m_priorityBoostMessage = parameters.priorityBoostMessage; >+#endif >+ >+ initializeProcess(parameters); >+ initializeProcessName(parameters); >+ >+ SandboxInitializationParameters sandboxParameters; >+ initializeSandbox(parameters, sandboxParameters); >+ >+ // In WebKit2, only the UI process should ever be generating non-default PAL::SessionIDs. >+ PAL::SessionID::enableGenerationProtection(); >+ >+ m_connection = IPC::Connection::createClientConnection(parameters.connectionIdentifier, *this); >+ initializeConnection(m_connection.get()); >+ m_connection->open(); >+} >+ >+void ChildProcess::setProcessSuppressionEnabled(bool enabled) >+{ >+ if (enabled) >+ m_processSuppressionDisabled.stop(); >+ else >+ m_processSuppressionDisabled.start(); >+} >+ >+void ChildProcess::initializeProcess(const ChildProcessInitializationParameters&) >+{ >+} >+ >+void ChildProcess::initializeProcessName(const ChildProcessInitializationParameters&) >+{ >+} >+ >+void ChildProcess::initializeConnection(IPC::Connection*) >+{ >+} >+ >+void ChildProcess::addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver& messageReceiver) >+{ >+ m_messageReceiverMap.addMessageReceiver(messageReceiverName, messageReceiver); >+} >+ >+void ChildProcess::addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver& messageReceiver) >+{ >+ m_messageReceiverMap.addMessageReceiver(messageReceiverName, destinationID, messageReceiver); >+} >+ >+void ChildProcess::removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID) >+{ >+ m_messageReceiverMap.removeMessageReceiver(messageReceiverName, destinationID); >+} >+ >+void ChildProcess::removeMessageReceiver(IPC::StringReference messageReceiverName) >+{ >+ m_messageReceiverMap.removeMessageReceiver(messageReceiverName); >+} >+ >+void ChildProcess::removeMessageReceiver(IPC::MessageReceiver& messageReceiver) >+{ >+ m_messageReceiverMap.removeMessageReceiver(messageReceiver); >+} >+ >+void ChildProcess::disableTermination() >+{ >+ m_terminationCounter++; >+ m_terminationTimer.stop(); >+} >+ >+void ChildProcess::enableTermination() >+{ >+ ASSERT(m_terminationCounter > 0); >+ m_terminationCounter--; >+ >+ if (m_terminationCounter) >+ return; >+ >+ if (!m_terminationTimeout) { >+ terminationTimerFired(); >+ return; >+ } >+ >+ m_terminationTimer.startOneShot(m_terminationTimeout); >+} >+ >+IPC::Connection* ChildProcess::messageSenderConnection() >+{ >+ return m_connection.get(); >+} >+ >+uint64_t ChildProcess::messageSenderDestinationID() >+{ >+ return 0; >+} >+ >+void ChildProcess::terminationTimerFired() >+{ >+ if (!shouldTerminate()) >+ return; >+ >+ terminate(); >+} >+ >+void ChildProcess::stopRunLoop() >+{ >+ platformStopRunLoop(); >+} >+ >+#if !PLATFORM(IOS_FAMILY) >+void ChildProcess::platformStopRunLoop() >+{ >+ RunLoop::main().stop(); >+} >+#endif >+ >+void ChildProcess::terminate() >+{ >+ m_connection->invalidate(); >+ >+ stopRunLoop(); >+} >+ >+void ChildProcess::shutDown() >+{ >+ terminate(); >+} >+ >+void ChildProcess::registerURLSchemeServiceWorkersCanHandle(const String& urlScheme) const >+{ >+ WebCore::SchemeRegistry::registerURLSchemeServiceWorkersCanHandle(urlScheme); >+} >+ >+#if !PLATFORM(COCOA) >+void ChildProcess::platformInitialize() >+{ >+} >+ >+void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&) >+{ >+} >+ >+void ChildProcess::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) >+{ >+ WTFLogAlways("Received invalid message: '%s::%s'", messageReceiverName.toString().data(), messageName.toString().data()); >+ CRASH(); >+} >+ >+#if OS(LINUX) >+void ChildProcess::didReceiveMemoryPressureEvent(bool isCritical) >+{ >+ MemoryPressureHandler::singleton().triggerMemoryPressureEvent(isCritical); >+} >+#endif >+ >+#endif // !PLATFORM(COCOA) >+ >+} // namespace WebKit > >Property changes on: Source/WebKit/Shared/AuxiliaryProcess.cpp >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Index: Source/WebKit/Shared/AuxiliaryProcess.cpp >=================================================================== >--- Source/WebKit/Shared/AuxiliaryProcess.cpp (revision 240589) >+++ Source/WebKit/Shared/AuxiliaryProcess.cpp (working copy) >@@ -24,7 +24,7 @@ > */ > > #include "config.h" >-#include "ChildProcess.h" >+#include "AuxiliaryProcess.h" > > #include "Logging.h" > #include "SandboxInitializationParameters.h" >@@ -42,23 +42,23 @@ > namespace WebKit { > using namespace WebCore; > >-ChildProcess::ChildProcess() >+AuxiliaryProcess::AuxiliaryProcess() > : m_terminationCounter(0) >- , m_terminationTimer(RunLoop::main(), this, &ChildProcess::terminationTimerFired) >+ , m_terminationTimer(RunLoop::main(), this, &AuxiliaryProcess::terminationTimerFired) > , m_processSuppressionDisabled("Process Suppression Disabled by UIProcess") > { > } > >-ChildProcess::~ChildProcess() >+AuxiliaryProcess::~AuxiliaryProcess() > { > } > >-void ChildProcess::didClose(IPC::Connection&) >+void AuxiliaryProcess::didClose(IPC::Connection&) > { > _exit(EXIT_SUCCESS); > } > >-void ChildProcess::initialize(const ChildProcessInitializationParameters& parameters) >+void AuxiliaryProcess::initialize(const AuxiliaryProcessInitializationParameters& parameters) > { > RELEASE_ASSERT_WITH_MESSAGE(parameters.processIdentifier, "Unable to initialize child process without a WebCore process identifier"); > Process::setIdentifier(*parameters.processIdentifier); >@@ -83,7 +83,7 @@ void ChildProcess::initialize(const Chil > m_connection->open(); > } > >-void ChildProcess::setProcessSuppressionEnabled(bool enabled) >+void AuxiliaryProcess::setProcessSuppressionEnabled(bool enabled) > { > if (enabled) > m_processSuppressionDisabled.stop(); >@@ -91,50 +91,50 @@ void ChildProcess::setProcessSuppression > m_processSuppressionDisabled.start(); > } > >-void ChildProcess::initializeProcess(const ChildProcessInitializationParameters&) >+void AuxiliaryProcess::initializeProcess(const AuxiliaryProcessInitializationParameters&) > { > } > >-void ChildProcess::initializeProcessName(const ChildProcessInitializationParameters&) >+void AuxiliaryProcess::initializeProcessName(const AuxiliaryProcessInitializationParameters&) > { > } > >-void ChildProcess::initializeConnection(IPC::Connection*) >+void AuxiliaryProcess::initializeConnection(IPC::Connection*) > { > } > >-void ChildProcess::addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver& messageReceiver) >+void AuxiliaryProcess::addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver& messageReceiver) > { > m_messageReceiverMap.addMessageReceiver(messageReceiverName, messageReceiver); > } > >-void ChildProcess::addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver& messageReceiver) >+void AuxiliaryProcess::addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver& messageReceiver) > { > m_messageReceiverMap.addMessageReceiver(messageReceiverName, destinationID, messageReceiver); > } > >-void ChildProcess::removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID) >+void AuxiliaryProcess::removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID) > { > m_messageReceiverMap.removeMessageReceiver(messageReceiverName, destinationID); > } > >-void ChildProcess::removeMessageReceiver(IPC::StringReference messageReceiverName) >+void AuxiliaryProcess::removeMessageReceiver(IPC::StringReference messageReceiverName) > { > m_messageReceiverMap.removeMessageReceiver(messageReceiverName); > } > >-void ChildProcess::removeMessageReceiver(IPC::MessageReceiver& messageReceiver) >+void AuxiliaryProcess::removeMessageReceiver(IPC::MessageReceiver& messageReceiver) > { > m_messageReceiverMap.removeMessageReceiver(messageReceiver); > } > >-void ChildProcess::disableTermination() >+void AuxiliaryProcess::disableTermination() > { > m_terminationCounter++; > m_terminationTimer.stop(); > } > >-void ChildProcess::enableTermination() >+void AuxiliaryProcess::enableTermination() > { > ASSERT(m_terminationCounter > 0); > m_terminationCounter--; >@@ -150,17 +150,17 @@ void ChildProcess::enableTermination() > m_terminationTimer.startOneShot(m_terminationTimeout); > } > >-IPC::Connection* ChildProcess::messageSenderConnection() >+IPC::Connection* AuxiliaryProcess::messageSenderConnection() > { > return m_connection.get(); > } > >-uint64_t ChildProcess::messageSenderDestinationID() >+uint64_t AuxiliaryProcess::messageSenderDestinationID() > { > return 0; > } > >-void ChildProcess::terminationTimerFired() >+void AuxiliaryProcess::terminationTimerFired() > { > if (!shouldTerminate()) > return; >@@ -168,52 +168,52 @@ void ChildProcess::terminationTimerFired > terminate(); > } > >-void ChildProcess::stopRunLoop() >+void AuxiliaryProcess::stopRunLoop() > { > platformStopRunLoop(); > } > > #if !PLATFORM(IOS_FAMILY) >-void ChildProcess::platformStopRunLoop() >+void AuxiliaryProcess::platformStopRunLoop() > { > RunLoop::main().stop(); > } > #endif > >-void ChildProcess::terminate() >+void AuxiliaryProcess::terminate() > { > m_connection->invalidate(); > > stopRunLoop(); > } > >-void ChildProcess::shutDown() >+void AuxiliaryProcess::shutDown() > { > terminate(); > } > >-void ChildProcess::registerURLSchemeServiceWorkersCanHandle(const String& urlScheme) const >+void AuxiliaryProcess::registerURLSchemeServiceWorkersCanHandle(const String& urlScheme) const > { > WebCore::SchemeRegistry::registerURLSchemeServiceWorkersCanHandle(urlScheme); > } > > #if !PLATFORM(COCOA) >-void ChildProcess::platformInitialize() >+void AuxiliaryProcess::platformInitialize() > { > } > >-void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&) >+void AuxiliaryProcess::initializeSandbox(const AuxiliaryProcessInitializationParameters&, SandboxInitializationParameters&) > { > } > >-void ChildProcess::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) >+void AuxiliaryProcess::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) > { > WTFLogAlways("Received invalid message: '%s::%s'", messageReceiverName.toString().data(), messageName.toString().data()); > CRASH(); > } > > #if OS(LINUX) >-void ChildProcess::didReceiveMemoryPressureEvent(bool isCritical) >+void AuxiliaryProcess::didReceiveMemoryPressureEvent(bool isCritical) > { > MemoryPressureHandler::singleton().triggerMemoryPressureEvent(isCritical); > } >Index: Source/WebKit/Shared/AuxiliaryProcess.h >=================================================================== >--- Source/WebKit/Shared/AuxiliaryProcess.h (revision 240589) (from Source/WebKit/Shared/ChildProcess.h:240589) >+++ Source/WebKit/Shared/AuxiliaryProcess.h (working copy) >@@ -0,0 +1,166 @@ >+/* >+ * Copyright (C) 2010-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. >+ */ >+ >+#ifndef ChildProcess_h >+#define ChildProcess_h >+ >+#include "Connection.h" >+#include "MessageReceiverMap.h" >+#include "MessageSender.h" >+#include <WebCore/Process.h> >+#include <WebCore/UserActivity.h> >+#include <wtf/HashMap.h> >+#include <wtf/RunLoop.h> >+#include <wtf/text/StringHash.h> >+#include <wtf/text/WTFString.h> >+ >+namespace WebKit { >+ >+class SandboxInitializationParameters; >+struct ChildProcessInitializationParameters; >+ >+class ChildProcess : protected IPC::Connection::Client, public IPC::MessageSender { >+ WTF_MAKE_NONCOPYABLE(ChildProcess); >+ >+public: >+ enum class ProcessType : uint8_t { >+ WebContent, >+ Network, >+ Plugin >+ }; >+ >+ void initialize(const ChildProcessInitializationParameters&); >+ >+ // disable and enable termination of the process. when disableTermination is called, the >+ // process won't terminate unless a corresponding disableTermination call is made. >+ void disableTermination(); >+ void enableTermination(); >+ >+ void addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver&); >+ void addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver&); >+ void removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID); >+ void removeMessageReceiver(IPC::StringReference messageReceiverName); >+ void removeMessageReceiver(IPC::MessageReceiver&); >+ >+ void setProcessSuppressionEnabled(bool); >+ >+#if PLATFORM(COCOA) >+ void setApplicationIsDaemon(); >+ void launchServicesCheckIn(); >+ void setQOS(int latencyQOS, int throughputQOS); >+#endif >+ >+ IPC::Connection* parentProcessConnection() const { return m_connection.get(); } >+ >+ IPC::MessageReceiverMap& messageReceiverMap() { return m_messageReceiverMap; } >+ >+#if PLATFORM(MAC) >+ static bool isSystemWebKit(); >+#endif >+ >+protected: >+ explicit ChildProcess(); >+ virtual ~ChildProcess(); >+ >+ void setTerminationTimeout(Seconds seconds) { m_terminationTimeout = seconds; } >+ >+ virtual void initializeProcess(const ChildProcessInitializationParameters&); >+ virtual void initializeProcessName(const ChildProcessInitializationParameters&); >+ virtual void initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&); >+ virtual void initializeConnection(IPC::Connection*); >+ >+ virtual bool shouldTerminate() = 0; >+ virtual void terminate(); >+ >+ virtual void stopRunLoop(); >+ >+#if USE(APPKIT) >+ static void stopNSAppRunLoop(); >+#endif >+ >+#if PLATFORM(MAC) && ENABLE(WEBPROCESS_NSRUNLOOP) >+ static void stopNSRunLoop(); >+#endif >+ >+ void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; >+ >+ void registerURLSchemeServiceWorkersCanHandle(const String&) const; >+#if OS(LINUX) >+ void didReceiveMemoryPressureEvent(bool isCritical); >+#endif >+ >+private: >+ virtual bool shouldOverrideQuarantine() { return true; } >+ >+ // IPC::MessageSender >+ IPC::Connection* messageSenderConnection() override; >+ uint64_t messageSenderDestinationID() override; >+ >+ // IPC::Connection::Client. >+ void didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) final; >+ void didClose(IPC::Connection&) override; >+ >+ void shutDown(); >+ >+ void terminationTimerFired(); >+ >+ void platformInitialize(); >+ void platformStopRunLoop(); >+ >+ // The timeout, in seconds, before this process will be terminated if termination >+ // has been enabled. If the timeout is 0 seconds, the process will be terminated immediately. >+ Seconds m_terminationTimeout; >+ >+ // A termination counter; when the counter reaches zero, the process will be terminated >+ // after a given period of time. >+ unsigned m_terminationCounter; >+ >+ RunLoop::Timer<ChildProcess> m_terminationTimer; >+ >+ RefPtr<IPC::Connection> m_connection; >+ IPC::MessageReceiverMap m_messageReceiverMap; >+ >+ UserActivity m_processSuppressionDisabled; >+ >+#if PLATFORM(COCOA) >+ OSObjectPtr<xpc_object_t> m_priorityBoostMessage; >+#endif >+}; >+ >+struct ChildProcessInitializationParameters { >+ String uiProcessName; >+ String clientIdentifier; >+ Optional<WebCore::ProcessIdentifier> processIdentifier; >+ IPC::Connection::Identifier connectionIdentifier; >+ HashMap<String, String> extraInitializationData; >+ ChildProcess::ProcessType processType; >+#if PLATFORM(COCOA) >+ OSObjectPtr<xpc_object_t> priorityBoostMessage; >+#endif >+}; >+ >+} // namespace WebKit >+ >+#endif // ChildProcess_h > >Property changes on: Source/WebKit/Shared/AuxiliaryProcess.h >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Index: Source/WebKit/Shared/AuxiliaryProcess.h >=================================================================== >--- Source/WebKit/Shared/AuxiliaryProcess.h (revision 240589) >+++ Source/WebKit/Shared/AuxiliaryProcess.h (working copy) >@@ -23,8 +23,7 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef ChildProcess_h >-#define ChildProcess_h >+#pragma once > > #include "Connection.h" > #include "MessageReceiverMap.h" >@@ -39,10 +38,10 @@ > namespace WebKit { > > class SandboxInitializationParameters; >-struct ChildProcessInitializationParameters; >+struct AuxiliaryProcessInitializationParameters; > >-class ChildProcess : protected IPC::Connection::Client, public IPC::MessageSender { >- WTF_MAKE_NONCOPYABLE(ChildProcess); >+class AuxiliaryProcess : protected IPC::Connection::Client, public IPC::MessageSender { >+ WTF_MAKE_NONCOPYABLE(AuxiliaryProcess); > > public: > enum class ProcessType : uint8_t { >@@ -51,7 +50,7 @@ public: > Plugin > }; > >- void initialize(const ChildProcessInitializationParameters&); >+ void initialize(const AuxiliaryProcessInitializationParameters&); > > // disable and enable termination of the process. when disableTermination is called, the > // process won't terminate unless a corresponding disableTermination call is made. >@@ -81,14 +80,14 @@ public: > #endif > > protected: >- explicit ChildProcess(); >- virtual ~ChildProcess(); >+ explicit AuxiliaryProcess(); >+ virtual ~AuxiliaryProcess(); > > void setTerminationTimeout(Seconds seconds) { m_terminationTimeout = seconds; } > >- virtual void initializeProcess(const ChildProcessInitializationParameters&); >- virtual void initializeProcessName(const ChildProcessInitializationParameters&); >- virtual void initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&); >+ virtual void initializeProcess(const AuxiliaryProcessInitializationParameters&); >+ virtual void initializeProcessName(const AuxiliaryProcessInitializationParameters&); >+ virtual void initializeSandbox(const AuxiliaryProcessInitializationParameters&, SandboxInitializationParameters&); > virtual void initializeConnection(IPC::Connection*); > > virtual bool shouldTerminate() = 0; >@@ -137,7 +136,7 @@ private: > // after a given period of time. > unsigned m_terminationCounter; > >- RunLoop::Timer<ChildProcess> m_terminationTimer; >+ RunLoop::Timer<AuxiliaryProcess> m_terminationTimer; > > RefPtr<IPC::Connection> m_connection; > IPC::MessageReceiverMap m_messageReceiverMap; >@@ -149,18 +148,16 @@ private: > #endif > }; > >-struct ChildProcessInitializationParameters { >+struct AuxiliaryProcessInitializationParameters { > String uiProcessName; > String clientIdentifier; > Optional<WebCore::ProcessIdentifier> processIdentifier; > IPC::Connection::Identifier connectionIdentifier; > HashMap<String, String> extraInitializationData; >- ChildProcess::ProcessType processType; >+ AuxiliaryProcess::ProcessType processType; > #if PLATFORM(COCOA) > OSObjectPtr<xpc_object_t> priorityBoostMessage; > #endif > }; > > } // namespace WebKit >- >-#endif // ChildProcess_h >Index: Source/WebKit/Shared/AuxiliaryProcess.messages.in >=================================================================== >--- Source/WebKit/Shared/AuxiliaryProcess.messages.in (revision 240589) (from Source/WebKit/Shared/ChildProcess.messages.in:240589) >+++ Source/WebKit/Shared/AuxiliaryProcess.messages.in (working copy) >@@ -0,0 +1,31 @@ >+# Copyright (C) 2015 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. >+ >+messages -> ChildProcess { >+ ShutDown() >+ RegisterURLSchemeServiceWorkersCanHandle(String scheme) >+ SetProcessSuppressionEnabled(bool flag) >+ >+#if OS(LINUX) >+ void DidReceiveMemoryPressureEvent(bool isCritical) >+#endif >+} >Index: Source/WebKit/Shared/AuxiliaryProcess.messages.in >=================================================================== >--- Source/WebKit/Shared/AuxiliaryProcess.messages.in (revision 240589) >+++ Source/WebKit/Shared/AuxiliaryProcess.messages.in (working copy) >@@ -20,7 +20,7 @@ > # 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. > >-messages -> ChildProcess { >+messages -> AuxiliaryProcess { > ShutDown() > RegisterURLSchemeServiceWorkersCanHandle(String scheme) > SetProcessSuppressionEnabled(bool flag) >Index: Source/WebKit/Shared/AuxiliaryProcessSupplement.h >=================================================================== >--- Source/WebKit/Shared/AuxiliaryProcessSupplement.h (revision 240589) (from Source/WebKit/Shared/ChildProcessSupplement.h:240589) >+++ Source/WebKit/Shared/AuxiliaryProcessSupplement.h (working copy) >@@ -0,0 +1,48 @@ >+/* >+ * 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. >+ */ >+ >+#ifndef ChildProcessSupplement_h >+#define ChildProcessSupplement_h >+ >+namespace IPC { >+class Connection; >+} // namespace IPC >+ >+namespace WebKit { >+ >+class ChildProcessSupplement { >+public: >+ virtual ~ChildProcessSupplement() >+ { >+ } >+ >+ virtual void initializeConnection(IPC::Connection*) >+ { >+ } >+}; >+ >+} // namespace WebKit >+ >+#endif // ChildProcessSupplement_h >Index: Source/WebKit/Shared/AuxiliaryProcessSupplement.h >=================================================================== >--- Source/WebKit/Shared/AuxiliaryProcessSupplement.h (revision 240589) >+++ Source/WebKit/Shared/AuxiliaryProcessSupplement.h (working copy) >@@ -23,8 +23,7 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef ChildProcessSupplement_h >-#define ChildProcessSupplement_h >+#pragma once > > namespace IPC { > class Connection; >@@ -32,9 +31,9 @@ class Connection; > > namespace WebKit { > >-class ChildProcessSupplement { >+class AuxiliaryProcessSupplement { > public: >- virtual ~ChildProcessSupplement() >+ virtual ~AuxiliaryProcessSupplement() > { > } > >@@ -44,5 +43,3 @@ public: > }; > > } // namespace WebKit >- >-#endif // ChildProcessSupplement_h >Index: Source/WebKit/Shared/ChildProcess.cpp >=================================================================== >--- Source/WebKit/Shared/ChildProcess.cpp (revision 240589) >+++ Source/WebKit/Shared/ChildProcess.cpp (nonexistent) >@@ -1,224 +0,0 @@ >-/* >- * Copyright (C) 2010 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. >- */ >- >-#include "config.h" >-#include "ChildProcess.h" >- >-#include "Logging.h" >-#include "SandboxInitializationParameters.h" >-#include <WebCore/SchemeRegistry.h> >-#include <pal/SessionID.h> >- >-#if !OS(WINDOWS) >-#include <unistd.h> >-#endif >- >-#if OS(LINUX) >-#include <wtf/MemoryPressureHandler.h> >-#endif >- >-namespace WebKit { >-using namespace WebCore; >- >-ChildProcess::ChildProcess() >- : m_terminationCounter(0) >- , m_terminationTimer(RunLoop::main(), this, &ChildProcess::terminationTimerFired) >- , m_processSuppressionDisabled("Process Suppression Disabled by UIProcess") >-{ >-} >- >-ChildProcess::~ChildProcess() >-{ >-} >- >-void ChildProcess::didClose(IPC::Connection&) >-{ >- _exit(EXIT_SUCCESS); >-} >- >-void ChildProcess::initialize(const ChildProcessInitializationParameters& parameters) >-{ >- RELEASE_ASSERT_WITH_MESSAGE(parameters.processIdentifier, "Unable to initialize child process without a WebCore process identifier"); >- Process::setIdentifier(*parameters.processIdentifier); >- >- platformInitialize(); >- >-#if PLATFORM(COCOA) >- m_priorityBoostMessage = parameters.priorityBoostMessage; >-#endif >- >- initializeProcess(parameters); >- initializeProcessName(parameters); >- >- SandboxInitializationParameters sandboxParameters; >- initializeSandbox(parameters, sandboxParameters); >- >- // In WebKit2, only the UI process should ever be generating non-default PAL::SessionIDs. >- PAL::SessionID::enableGenerationProtection(); >- >- m_connection = IPC::Connection::createClientConnection(parameters.connectionIdentifier, *this); >- initializeConnection(m_connection.get()); >- m_connection->open(); >-} >- >-void ChildProcess::setProcessSuppressionEnabled(bool enabled) >-{ >- if (enabled) >- m_processSuppressionDisabled.stop(); >- else >- m_processSuppressionDisabled.start(); >-} >- >-void ChildProcess::initializeProcess(const ChildProcessInitializationParameters&) >-{ >-} >- >-void ChildProcess::initializeProcessName(const ChildProcessInitializationParameters&) >-{ >-} >- >-void ChildProcess::initializeConnection(IPC::Connection*) >-{ >-} >- >-void ChildProcess::addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver& messageReceiver) >-{ >- m_messageReceiverMap.addMessageReceiver(messageReceiverName, messageReceiver); >-} >- >-void ChildProcess::addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver& messageReceiver) >-{ >- m_messageReceiverMap.addMessageReceiver(messageReceiverName, destinationID, messageReceiver); >-} >- >-void ChildProcess::removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID) >-{ >- m_messageReceiverMap.removeMessageReceiver(messageReceiverName, destinationID); >-} >- >-void ChildProcess::removeMessageReceiver(IPC::StringReference messageReceiverName) >-{ >- m_messageReceiverMap.removeMessageReceiver(messageReceiverName); >-} >- >-void ChildProcess::removeMessageReceiver(IPC::MessageReceiver& messageReceiver) >-{ >- m_messageReceiverMap.removeMessageReceiver(messageReceiver); >-} >- >-void ChildProcess::disableTermination() >-{ >- m_terminationCounter++; >- m_terminationTimer.stop(); >-} >- >-void ChildProcess::enableTermination() >-{ >- ASSERT(m_terminationCounter > 0); >- m_terminationCounter--; >- >- if (m_terminationCounter) >- return; >- >- if (!m_terminationTimeout) { >- terminationTimerFired(); >- return; >- } >- >- m_terminationTimer.startOneShot(m_terminationTimeout); >-} >- >-IPC::Connection* ChildProcess::messageSenderConnection() >-{ >- return m_connection.get(); >-} >- >-uint64_t ChildProcess::messageSenderDestinationID() >-{ >- return 0; >-} >- >-void ChildProcess::terminationTimerFired() >-{ >- if (!shouldTerminate()) >- return; >- >- terminate(); >-} >- >-void ChildProcess::stopRunLoop() >-{ >- platformStopRunLoop(); >-} >- >-#if !PLATFORM(IOS_FAMILY) >-void ChildProcess::platformStopRunLoop() >-{ >- RunLoop::main().stop(); >-} >-#endif >- >-void ChildProcess::terminate() >-{ >- m_connection->invalidate(); >- >- stopRunLoop(); >-} >- >-void ChildProcess::shutDown() >-{ >- terminate(); >-} >- >-void ChildProcess::registerURLSchemeServiceWorkersCanHandle(const String& urlScheme) const >-{ >- WebCore::SchemeRegistry::registerURLSchemeServiceWorkersCanHandle(urlScheme); >-} >- >-#if !PLATFORM(COCOA) >-void ChildProcess::platformInitialize() >-{ >-} >- >-void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&) >-{ >-} >- >-void ChildProcess::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) >-{ >- WTFLogAlways("Received invalid message: '%s::%s'", messageReceiverName.toString().data(), messageName.toString().data()); >- CRASH(); >-} >- >-#if OS(LINUX) >-void ChildProcess::didReceiveMemoryPressureEvent(bool isCritical) >-{ >- MemoryPressureHandler::singleton().triggerMemoryPressureEvent(isCritical); >-} >-#endif >- >-#endif // !PLATFORM(COCOA) >- >-} // namespace WebKit > >Property changes on: Source/WebKit/Shared/ChildProcess.cpp >___________________________________________________________________ >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Index: Source/WebKit/Shared/ChildProcess.h >=================================================================== >--- Source/WebKit/Shared/ChildProcess.h (revision 240589) >+++ Source/WebKit/Shared/ChildProcess.h (nonexistent) >@@ -1,166 +0,0 @@ >-/* >- * Copyright (C) 2010-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. >- */ >- >-#ifndef ChildProcess_h >-#define ChildProcess_h >- >-#include "Connection.h" >-#include "MessageReceiverMap.h" >-#include "MessageSender.h" >-#include <WebCore/Process.h> >-#include <WebCore/UserActivity.h> >-#include <wtf/HashMap.h> >-#include <wtf/RunLoop.h> >-#include <wtf/text/StringHash.h> >-#include <wtf/text/WTFString.h> >- >-namespace WebKit { >- >-class SandboxInitializationParameters; >-struct ChildProcessInitializationParameters; >- >-class ChildProcess : protected IPC::Connection::Client, public IPC::MessageSender { >- WTF_MAKE_NONCOPYABLE(ChildProcess); >- >-public: >- enum class ProcessType : uint8_t { >- WebContent, >- Network, >- Plugin >- }; >- >- void initialize(const ChildProcessInitializationParameters&); >- >- // disable and enable termination of the process. when disableTermination is called, the >- // process won't terminate unless a corresponding disableTermination call is made. >- void disableTermination(); >- void enableTermination(); >- >- void addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver&); >- void addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver&); >- void removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID); >- void removeMessageReceiver(IPC::StringReference messageReceiverName); >- void removeMessageReceiver(IPC::MessageReceiver&); >- >- void setProcessSuppressionEnabled(bool); >- >-#if PLATFORM(COCOA) >- void setApplicationIsDaemon(); >- void launchServicesCheckIn(); >- void setQOS(int latencyQOS, int throughputQOS); >-#endif >- >- IPC::Connection* parentProcessConnection() const { return m_connection.get(); } >- >- IPC::MessageReceiverMap& messageReceiverMap() { return m_messageReceiverMap; } >- >-#if PLATFORM(MAC) >- static bool isSystemWebKit(); >-#endif >- >-protected: >- explicit ChildProcess(); >- virtual ~ChildProcess(); >- >- void setTerminationTimeout(Seconds seconds) { m_terminationTimeout = seconds; } >- >- virtual void initializeProcess(const ChildProcessInitializationParameters&); >- virtual void initializeProcessName(const ChildProcessInitializationParameters&); >- virtual void initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&); >- virtual void initializeConnection(IPC::Connection*); >- >- virtual bool shouldTerminate() = 0; >- virtual void terminate(); >- >- virtual void stopRunLoop(); >- >-#if USE(APPKIT) >- static void stopNSAppRunLoop(); >-#endif >- >-#if PLATFORM(MAC) && ENABLE(WEBPROCESS_NSRUNLOOP) >- static void stopNSRunLoop(); >-#endif >- >- void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; >- >- void registerURLSchemeServiceWorkersCanHandle(const String&) const; >-#if OS(LINUX) >- void didReceiveMemoryPressureEvent(bool isCritical); >-#endif >- >-private: >- virtual bool shouldOverrideQuarantine() { return true; } >- >- // IPC::MessageSender >- IPC::Connection* messageSenderConnection() override; >- uint64_t messageSenderDestinationID() override; >- >- // IPC::Connection::Client. >- void didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) final; >- void didClose(IPC::Connection&) override; >- >- void shutDown(); >- >- void terminationTimerFired(); >- >- void platformInitialize(); >- void platformStopRunLoop(); >- >- // The timeout, in seconds, before this process will be terminated if termination >- // has been enabled. If the timeout is 0 seconds, the process will be terminated immediately. >- Seconds m_terminationTimeout; >- >- // A termination counter; when the counter reaches zero, the process will be terminated >- // after a given period of time. >- unsigned m_terminationCounter; >- >- RunLoop::Timer<ChildProcess> m_terminationTimer; >- >- RefPtr<IPC::Connection> m_connection; >- IPC::MessageReceiverMap m_messageReceiverMap; >- >- UserActivity m_processSuppressionDisabled; >- >-#if PLATFORM(COCOA) >- OSObjectPtr<xpc_object_t> m_priorityBoostMessage; >-#endif >-}; >- >-struct ChildProcessInitializationParameters { >- String uiProcessName; >- String clientIdentifier; >- Optional<WebCore::ProcessIdentifier> processIdentifier; >- IPC::Connection::Identifier connectionIdentifier; >- HashMap<String, String> extraInitializationData; >- ChildProcess::ProcessType processType; >-#if PLATFORM(COCOA) >- OSObjectPtr<xpc_object_t> priorityBoostMessage; >-#endif >-}; >- >-} // namespace WebKit >- >-#endif // ChildProcess_h > >Property changes on: Source/WebKit/Shared/ChildProcess.h >___________________________________________________________________ >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Index: Source/WebKit/Shared/ChildProcess.messages.in >=================================================================== >--- Source/WebKit/Shared/ChildProcess.messages.in (revision 240589) >+++ Source/WebKit/Shared/ChildProcess.messages.in (nonexistent) >@@ -1,31 +0,0 @@ >-# Copyright (C) 2015 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. >- >-messages -> ChildProcess { >- ShutDown() >- RegisterURLSchemeServiceWorkersCanHandle(String scheme) >- SetProcessSuppressionEnabled(bool flag) >- >-#if OS(LINUX) >- void DidReceiveMemoryPressureEvent(bool isCritical) >-#endif >-} >Index: Source/WebKit/Shared/ChildProcessSupplement.h >=================================================================== >--- Source/WebKit/Shared/ChildProcessSupplement.h (revision 240589) >+++ Source/WebKit/Shared/ChildProcessSupplement.h (nonexistent) >@@ -1,48 +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. >- */ >- >-#ifndef ChildProcessSupplement_h >-#define ChildProcessSupplement_h >- >-namespace IPC { >-class Connection; >-} // namespace IPC >- >-namespace WebKit { >- >-class ChildProcessSupplement { >-public: >- virtual ~ChildProcessSupplement() >- { >- } >- >- virtual void initializeConnection(IPC::Connection*) >- { >- } >-}; >- >-} // namespace WebKit >- >-#endif // ChildProcessSupplement_h >Index: Source/WebKit/Shared/WebSQLiteDatabaseTracker.cpp >=================================================================== >--- Source/WebKit/Shared/WebSQLiteDatabaseTracker.cpp (revision 240589) >+++ Source/WebKit/Shared/WebSQLiteDatabaseTracker.cpp (working copy) >@@ -39,15 +39,6 @@ using namespace WebCore; > WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker(NetworkProcess& process) > : m_process(process) > , m_hysteresis([this](PAL::HysteresisState state) { hysteresisUpdated(state); }) >- , m_childProcessType(ChildProcessType::Network) >-{ >- SQLiteDatabaseTracker::setClient(this); >-} >- >-WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker(WebProcess& process) >- : m_process(process) >- , m_hysteresis([this](PAL::HysteresisState state) { hysteresisUpdated(state); }) >- , m_childProcessType(ChildProcessType::WebContent) > { > SQLiteDatabaseTracker::setClient(this); > } >@@ -68,14 +59,7 @@ void WebSQLiteDatabaseTracker::didFinish > > void WebSQLiteDatabaseTracker::hysteresisUpdated(PAL::HysteresisState state) > { >- switch (m_childProcessType) { >- case ChildProcessType::WebContent: >- m_process.parentProcessConnection()->send(Messages::WebProcessProxy::SetIsHoldingLockedFiles(state == PAL::HysteresisState::Started), 0); >- break; >- case ChildProcessType::Network: >- m_process.parentProcessConnection()->send(Messages::NetworkProcessProxy::SetIsHoldingLockedFiles(state == PAL::HysteresisState::Started), 0); >- break; >- } >+ m_process.parentProcessConnection()->send(Messages::NetworkProcessProxy::SetIsHoldingLockedFiles(state == PAL::HysteresisState::Started), 0); > } > > } // namespace WebKit >Index: Source/WebKit/Shared/WebSQLiteDatabaseTracker.h >=================================================================== >--- Source/WebKit/Shared/WebSQLiteDatabaseTracker.h (revision 240589) >+++ Source/WebKit/Shared/WebSQLiteDatabaseTracker.h (working copy) >@@ -23,8 +23,7 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef WebSQLiteDatabaseTracker_h >-#define WebSQLiteDatabaseTracker_h >+#pragma once > > #include <WebCore/SQLiteDatabaseTrackerClient.h> > #include <pal/HysteresisActivity.h> >@@ -32,15 +31,12 @@ > > namespace WebKit { > >-class ChildProcess; > class NetworkProcess; >-class WebProcess; > > class WebSQLiteDatabaseTracker : public WebCore::SQLiteDatabaseTrackerClient { > WTF_MAKE_NONCOPYABLE(WebSQLiteDatabaseTracker) > public: > explicit WebSQLiteDatabaseTracker(NetworkProcess&); >- explicit WebSQLiteDatabaseTracker(WebProcess&); > > // WebCore::SQLiteDatabaseTrackerClient > void willBeginFirstTransaction() override; >@@ -49,12 +45,8 @@ public: > private: > void hysteresisUpdated(PAL::HysteresisState); > >- ChildProcess& m_process; >+ NetworkProcess& m_process; > PAL::HysteresisActivity m_hysteresis; >- enum class ChildProcessType { Network, WebContent }; >- ChildProcessType m_childProcessType; > }; > > } // namespace WebKit >- >-#endif // WebSQLiteDatabaseTracker_h >Index: Source/WebKit/Shared/Authentication/AuthenticationManager.cpp >=================================================================== >--- Source/WebKit/Shared/Authentication/AuthenticationManager.cpp (revision 240589) >+++ Source/WebKit/Shared/Authentication/AuthenticationManager.cpp (working copy) >@@ -27,9 +27,9 @@ > #include "AuthenticationManager.h" > > #include "AuthenticationManagerMessages.h" >-#include "ChildProcess.h" > #include "Download.h" > #include "DownloadProxyMessages.h" >+#include "NetworkProcess.h" > #include "NetworkProcessProxyMessages.h" > #include "PendingDownload.h" > #include "WebCoreArgumentCoders.h" >@@ -60,7 +60,7 @@ const char* AuthenticationManager::suppl > return "AuthenticationManager"; > } > >-AuthenticationManager::AuthenticationManager(ChildProcess& process) >+AuthenticationManager::AuthenticationManager(NetworkProcess& process) > : m_process(process) > { > m_process.addMessageReceiver(Messages::AuthenticationManager::messageReceiverName(), *this); >Index: Source/WebKit/Shared/Authentication/AuthenticationManager.h >=================================================================== >--- Source/WebKit/Shared/Authentication/AuthenticationManager.h (revision 240589) >+++ Source/WebKit/Shared/Authentication/AuthenticationManager.h (working copy) >@@ -23,8 +23,7 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef AuthenticationManager_h >-#define AuthenticationManager_h >+#pragma once > > #include "MessageReceiver.h" > #include "NetworkProcessSupplement.h" >@@ -46,9 +45,9 @@ class Credential; > > namespace WebKit { > >-class ChildProcess; > class Download; > class DownloadID; >+class NetworkProcess; > class WebFrame; > > enum class AuthenticationChallengeDisposition : uint8_t; >@@ -57,7 +56,7 @@ using ChallengeCompletionHandler = Compl > class AuthenticationManager : public NetworkProcessSupplement, public IPC::MessageReceiver, public CanMakeWeakPtr<AuthenticationManager> { > WTF_MAKE_NONCOPYABLE(AuthenticationManager); > public: >- explicit AuthenticationManager(ChildProcess&); >+ explicit AuthenticationManager(NetworkProcess&); > > static const char* supplementName(); > >@@ -88,11 +87,9 @@ private: > > Vector<uint64_t> coalesceChallengesMatching(uint64_t challengeID) const; > >- ChildProcess& m_process; >+ NetworkProcess& m_process; > > HashMap<uint64_t, Challenge> m_challenges; > }; > > } // namespace WebKit >- >-#endif // AuthenticationManager_h >Index: Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm >=================================================================== >--- Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm (revision 240589) (from Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm:240589) >+++ Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm (working copy) >@@ -0,0 +1,39 @@ >+/* >+ * Copyright (C) 2017 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 "ChildProcess.h" >+ >+#import "WKCrashReporter.h" >+ >+namespace WebKit { >+ >+void ChildProcess::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) >+{ >+ setCrashReportApplicationSpecificInformation((__bridge CFStringRef)[NSString stringWithFormat:@"Received invalid message: '%s::%s'", messageReceiverName.toString().data(), messageName.toString().data()]); >+ CRASH(); >+} >+ >+} >Index: Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm >=================================================================== >--- Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm (revision 240589) >+++ Source/WebKit/Shared/Cocoa/AuxiliaryProcessCocoa.mm (working copy) >@@ -24,13 +24,13 @@ > */ > > #import "config.h" >-#import "ChildProcess.h" >+#import "AuxiliaryProcess.h" > > #import "WKCrashReporter.h" > > namespace WebKit { > >-void ChildProcess::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) >+void AuxiliaryProcess::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) > { > setCrashReportApplicationSpecificInformation((__bridge CFStringRef)[NSString stringWithFormat:@"Received invalid message: '%s::%s'", messageReceiverName.toString().data(), messageName.toString().data()]); > CRASH(); >Index: Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm >=================================================================== >--- Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm (revision 240589) >+++ Source/WebKit/Shared/Cocoa/ChildProcessCocoa.mm (nonexistent) >@@ -1,39 +0,0 @@ >-/* >- * Copyright (C) 2017 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 "ChildProcess.h" >- >-#import "WKCrashReporter.h" >- >-namespace WebKit { >- >-void ChildProcess::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) >-{ >- setCrashReportApplicationSpecificInformation((__bridge CFStringRef)[NSString stringWithFormat:@"Received invalid message: '%s::%s'", messageReceiverName.toString().data(), messageName.toString().data()]); >- CRASH(); >-} >- >-} >Index: Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h >=================================================================== >--- Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h (revision 240589) >+++ Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h (working copy) >@@ -25,7 +25,7 @@ > > #pragma once > >-#import "ChildProcess.h" >+#import "AuxiliaryProcess.h" > #import "WebKit2Initialize.h" > #import <JavaScriptCore/ExecutableAllocator.h> > #import <wtf/OSObjectPtr.h> >@@ -68,7 +68,7 @@ protected: > }; > > template<typename XPCServiceType> >-void initializeChildProcess(ChildProcessInitializationParameters&& parameters) >+void initializeAuxiliaryProcess(AuxiliaryProcessInitializationParameters&& parameters) > { > XPCServiceType::singleton().initialize(WTFMove(parameters)); > } >@@ -92,7 +92,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END > if (!delegate.checkEntitlements()) > exit(EXIT_FAILURE); > >- ChildProcessInitializationParameters parameters; >+ AuxiliaryProcessInitializationParameters parameters; > if (priorityBoostMessage) > parameters.priorityBoostMessage = priorityBoostMessage; > >@@ -125,7 +125,7 @@ ALLOW_DEPRECATED_DECLARATIONS_END > > parameters.processType = XPCServiceType::processType; > >- initializeChildProcess<XPCServiceType>(WTFMove(parameters)); >+ initializeAuxiliaryProcess<XPCServiceType>(WTFMove(parameters)); > } > > int XPCServiceMain(int, const char**); >Index: Source/WebKit/Shared/ios/AuxiliaryProcessIOS.mm >=================================================================== >--- Source/WebKit/Shared/ios/AuxiliaryProcessIOS.mm (revision 240589) (from Source/WebKit/Shared/ios/ChildProcessIOS.mm:240589) >+++ Source/WebKit/Shared/ios/AuxiliaryProcessIOS.mm (working copy) >@@ -0,0 +1,124 @@ >+/* >+ * Copyright (C) 2012, 2014 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" >+ >+#if PLATFORM(IOS_FAMILY) && !PLATFORM(IOSMAC) >+ >+#import "ChildProcess.h" >+ >+#import "SandboxInitializationParameters.h" >+#import "XPCServiceEntryPoint.h" >+#import <WebCore/FloatingPointEnvironment.h> >+#import <WebCore/SystemVersion.h> >+#import <mach/mach.h> >+#import <mach/task.h> >+#import <pwd.h> >+#import <stdlib.h> >+#import <sysexits.h> >+#import <wtf/FileSystem.h> >+ >+#if ENABLE(MANUAL_SANDBOXING) >+#import <wtf/spi/darwin/SandboxSPI.h> >+#endif >+ >+namespace WebKit { >+ >+void ChildProcess::platformInitialize() >+{ >+ FloatingPointEnvironment& floatingPointEnvironment = FloatingPointEnvironment::singleton(); >+ floatingPointEnvironment.enableDenormalSupport(); >+ floatingPointEnvironment.saveMainThreadEnvironment(); >+ [[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] bundlePath]]; >+} >+ >+void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >+{ >+#if ENABLE(MANUAL_SANDBOXING) >+ NSBundle *webkit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")]; >+ String defaultProfilePath = [webkit2Bundle pathForResource:[[NSBundle mainBundle] bundleIdentifier] ofType:@"sb"]; >+ if (sandboxParameters.userDirectorySuffix().isNull()) { >+ String defaultUserDirectorySuffix = makeString(String([[NSBundle mainBundle] bundleIdentifier]), '+', parameters.clientIdentifier); >+ sandboxParameters.setUserDirectorySuffix(defaultUserDirectorySuffix); >+ } >+ >+#if !PLATFORM(IOSMAC) >+ String sandboxImportPath = "/usr/local/share/sandbox/imports"; >+ sandboxParameters.addPathParameter("IMPORT_DIR", FileSystem::fileSystemRepresentation(sandboxImportPath).data()); >+#endif >+ >+ switch (sandboxParameters.mode()) { >+ case SandboxInitializationParameters::UseDefaultSandboxProfilePath: >+ case SandboxInitializationParameters::UseOverrideSandboxProfilePath: { >+ String sandboxProfilePath = sandboxParameters.mode() == SandboxInitializationParameters::UseDefaultSandboxProfilePath ? defaultProfilePath : sandboxParameters.overrideSandboxProfilePath(); >+ if (!sandboxProfilePath.isEmpty()) { >+ CString profilePath = FileSystem::fileSystemRepresentation(sandboxProfilePath); >+ char* errorBuf; >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN >+ if (sandbox_init_with_parameters(profilePath.data(), SANDBOX_NAMED_EXTERNAL, sandboxParameters.namedParameterArray(), &errorBuf)) { >+ ALLOW_DEPRECATED_DECLARATIONS_END >+ WTFLogAlways("%s: Couldn't initialize sandbox profile [%s], error '%s'\n", getprogname(), profilePath.data(), errorBuf); >+ for (size_t i = 0, count = sandboxParameters.count(); i != count; ++i) >+ WTFLogAlways("%s=%s\n", sandboxParameters.name(i), sandboxParameters.value(i)); >+ exit(EX_NOPERM); >+ } >+ } >+ >+ break; >+ } >+ case SandboxInitializationParameters::UseSandboxProfile: { >+ char* errorBuf; >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN >+ if (sandbox_init_with_parameters(sandboxParameters.sandboxProfile().utf8().data(), 0, sandboxParameters.namedParameterArray(), &errorBuf)) { >+ ALLOW_DEPRECATED_DECLARATIONS_END >+ WTFLogAlways("%s: Couldn't initialize sandbox profile, error '%s'\n", getprogname(), errorBuf); >+ for (size_t i = 0, count = sandboxParameters.count(); i != count; ++i) >+ WTFLogAlways("%s=%s\n", sandboxParameters.name(i), sandboxParameters.value(i)); >+ exit(EX_NOPERM); >+ } >+ >+ break; >+ } >+ } >+#else >+ UNUSED_PARAM(parameters); >+ UNUSED_PARAM(sandboxParameters); >+ RELEASE_ASSERT_NOT_REACHED(); >+#endif >+} >+ >+void ChildProcess::setQOS(int, int) >+{ >+ >+} >+ >+void ChildProcess::platformStopRunLoop() >+{ >+ XPCServiceExit(WTFMove(m_priorityBoostMessage)); >+} >+ >+} // namespace WebKit >+ >+#endif >Index: Source/WebKit/Shared/ios/AuxiliaryProcessIOS.mm >=================================================================== >--- Source/WebKit/Shared/ios/AuxiliaryProcessIOS.mm (revision 240589) >+++ Source/WebKit/Shared/ios/AuxiliaryProcessIOS.mm (working copy) >@@ -24,11 +24,10 @@ > */ > > #import "config.h" >+#import "AuxiliaryProcess.h" > > #if PLATFORM(IOS_FAMILY) && !PLATFORM(IOSMAC) > >-#import "ChildProcess.h" >- > #import "SandboxInitializationParameters.h" > #import "XPCServiceEntryPoint.h" > #import <WebCore/FloatingPointEnvironment.h> >@@ -46,7 +45,7 @@ > > namespace WebKit { > >-void ChildProcess::platformInitialize() >+void AuxiliaryProcess::platformInitialize() > { > FloatingPointEnvironment& floatingPointEnvironment = FloatingPointEnvironment::singleton(); > floatingPointEnvironment.enableDenormalSupport(); >@@ -54,7 +53,7 @@ void ChildProcess::platformInitialize() > [[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] bundlePath]]; > } > >-void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >+void AuxiliaryProcess::initializeSandbox(const AuxiliaryProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) > { > #if ENABLE(MANUAL_SANDBOXING) > NSBundle *webkit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")]; >@@ -109,12 +108,12 @@ void ChildProcess::initializeSandbox(con > #endif > } > >-void ChildProcess::setQOS(int, int) >+void AuxiliaryProcess::setQOS(int, int) > { > > } > >-void ChildProcess::platformStopRunLoop() >+void AuxiliaryProcess::platformStopRunLoop() > { > XPCServiceExit(WTFMove(m_priorityBoostMessage)); > } >Index: Source/WebKit/Shared/ios/ChildProcessIOS.mm >=================================================================== >--- Source/WebKit/Shared/ios/ChildProcessIOS.mm (revision 240589) >+++ Source/WebKit/Shared/ios/ChildProcessIOS.mm (nonexistent) >@@ -1,124 +0,0 @@ >-/* >- * Copyright (C) 2012, 2014 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" >- >-#if PLATFORM(IOS_FAMILY) && !PLATFORM(IOSMAC) >- >-#import "ChildProcess.h" >- >-#import "SandboxInitializationParameters.h" >-#import "XPCServiceEntryPoint.h" >-#import <WebCore/FloatingPointEnvironment.h> >-#import <WebCore/SystemVersion.h> >-#import <mach/mach.h> >-#import <mach/task.h> >-#import <pwd.h> >-#import <stdlib.h> >-#import <sysexits.h> >-#import <wtf/FileSystem.h> >- >-#if ENABLE(MANUAL_SANDBOXING) >-#import <wtf/spi/darwin/SandboxSPI.h> >-#endif >- >-namespace WebKit { >- >-void ChildProcess::platformInitialize() >-{ >- FloatingPointEnvironment& floatingPointEnvironment = FloatingPointEnvironment::singleton(); >- floatingPointEnvironment.enableDenormalSupport(); >- floatingPointEnvironment.saveMainThreadEnvironment(); >- [[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] bundlePath]]; >-} >- >-void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >-{ >-#if ENABLE(MANUAL_SANDBOXING) >- NSBundle *webkit2Bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")]; >- String defaultProfilePath = [webkit2Bundle pathForResource:[[NSBundle mainBundle] bundleIdentifier] ofType:@"sb"]; >- if (sandboxParameters.userDirectorySuffix().isNull()) { >- String defaultUserDirectorySuffix = makeString(String([[NSBundle mainBundle] bundleIdentifier]), '+', parameters.clientIdentifier); >- sandboxParameters.setUserDirectorySuffix(defaultUserDirectorySuffix); >- } >- >-#if !PLATFORM(IOSMAC) >- String sandboxImportPath = "/usr/local/share/sandbox/imports"; >- sandboxParameters.addPathParameter("IMPORT_DIR", FileSystem::fileSystemRepresentation(sandboxImportPath).data()); >-#endif >- >- switch (sandboxParameters.mode()) { >- case SandboxInitializationParameters::UseDefaultSandboxProfilePath: >- case SandboxInitializationParameters::UseOverrideSandboxProfilePath: { >- String sandboxProfilePath = sandboxParameters.mode() == SandboxInitializationParameters::UseDefaultSandboxProfilePath ? defaultProfilePath : sandboxParameters.overrideSandboxProfilePath(); >- if (!sandboxProfilePath.isEmpty()) { >- CString profilePath = FileSystem::fileSystemRepresentation(sandboxProfilePath); >- char* errorBuf; >- ALLOW_DEPRECATED_DECLARATIONS_BEGIN >- if (sandbox_init_with_parameters(profilePath.data(), SANDBOX_NAMED_EXTERNAL, sandboxParameters.namedParameterArray(), &errorBuf)) { >- ALLOW_DEPRECATED_DECLARATIONS_END >- WTFLogAlways("%s: Couldn't initialize sandbox profile [%s], error '%s'\n", getprogname(), profilePath.data(), errorBuf); >- for (size_t i = 0, count = sandboxParameters.count(); i != count; ++i) >- WTFLogAlways("%s=%s\n", sandboxParameters.name(i), sandboxParameters.value(i)); >- exit(EX_NOPERM); >- } >- } >- >- break; >- } >- case SandboxInitializationParameters::UseSandboxProfile: { >- char* errorBuf; >- ALLOW_DEPRECATED_DECLARATIONS_BEGIN >- if (sandbox_init_with_parameters(sandboxParameters.sandboxProfile().utf8().data(), 0, sandboxParameters.namedParameterArray(), &errorBuf)) { >- ALLOW_DEPRECATED_DECLARATIONS_END >- WTFLogAlways("%s: Couldn't initialize sandbox profile, error '%s'\n", getprogname(), errorBuf); >- for (size_t i = 0, count = sandboxParameters.count(); i != count; ++i) >- WTFLogAlways("%s=%s\n", sandboxParameters.name(i), sandboxParameters.value(i)); >- exit(EX_NOPERM); >- } >- >- break; >- } >- } >-#else >- UNUSED_PARAM(parameters); >- UNUSED_PARAM(sandboxParameters); >- RELEASE_ASSERT_NOT_REACHED(); >-#endif >-} >- >-void ChildProcess::setQOS(int, int) >-{ >- >-} >- >-void ChildProcess::platformStopRunLoop() >-{ >- XPCServiceExit(WTFMove(m_priorityBoostMessage)); >-} >- >-} // namespace WebKit >- >-#endif >Index: Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm >=================================================================== >--- Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm (revision 240589) (from Source/WebKit/Shared/mac/ChildProcessMac.mm:240589) >+++ Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm (working copy) >@@ -0,0 +1,735 @@ >+/* >+ * Copyright (C) 2012-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" >+ >+#if PLATFORM(MAC) || PLATFORM(IOSMAC) >+#import "ChildProcess.h" >+ >+#import "CodeSigning.h" >+#import "QuarantineSPI.h" >+#import "SandboxInitializationParameters.h" >+#import "SandboxUtilities.h" >+#import "WKFoundation.h" >+#import "XPCServiceEntryPoint.h" >+#import <WebCore/FileHandle.h> >+#import <WebCore/SystemVersion.h> >+#import <mach-o/dyld.h> >+#import <mach/mach.h> >+#import <mach/task.h> >+#import <pal/crypto/CryptoDigest.h> >+#import <pal/spi/cocoa/LaunchServicesSPI.h> >+#import <pwd.h> >+#import <stdlib.h> >+#import <sys/sysctl.h> >+#import <sysexits.h> >+#import <wtf/DataLog.h> >+#import <wtf/FileSystem.h> >+#import <wtf/RandomNumber.h> >+#import <wtf/Scope.h> >+#import <wtf/SystemTracing.h> >+#import <wtf/WallTime.h> >+#import <wtf/spi/darwin/SandboxSPI.h> >+#import <wtf/text/Base64.h> >+#import <wtf/text/StringBuilder.h> >+ >+#if USE(APPLE_INTERNAL_SDK) >+#import <ApplicationServices/ApplicationServicesPriv.h> >+#import <rootless.h> >+#endif >+ >+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 >+#define USE_CACHE_COMPILED_SANDBOX 1 >+#else >+#define USE_CACHE_COMPILED_SANDBOX 0 >+#endif >+ >+#if PLATFORM(IOSMAC) && USE(APPLE_INTERNAL_SDK) >+enum LSSessionID { >+ kLSDefaultSessionID = -2, >+}; >+#endif >+ >+typedef bool (^LSServerConnectionAllowedBlock) ( CFDictionaryRef optionsRef ); >+extern "C" void _LSSetApplicationLaunchServicesServerConnectionStatus(uint64_t flags, LSServerConnectionAllowedBlock block); >+extern "C" CFDictionaryRef _LSApplicationCheckIn(LSSessionID sessionID, CFDictionaryRef applicationInfo); >+ >+namespace WebKit { >+using namespace WebCore; >+ >+#if USE(CACHE_COMPILED_SANDBOX) >+using SandboxProfile = typename std::remove_pointer<sandbox_profile_t>::type; >+struct SandboxProfileDeleter { >+ void operator()(SandboxProfile* ptr) >+ { >+ sandbox_free_profile(ptr); >+ } >+}; >+using SandboxProfilePtr = std::unique_ptr<SandboxProfile, SandboxProfileDeleter>; >+ >+using SandboxParameters = typename std::remove_pointer<sandbox_params_t>::type; >+struct SandboxParametersDeleter { >+ void operator()(SandboxParameters* ptr) >+ { >+ sandbox_free_params(ptr); >+ } >+}; >+using SandboxParametersPtr = std::unique_ptr<SandboxParameters, SandboxParametersDeleter>; >+ >+struct CachedSandboxHeader { >+ uint32_t versionNumber; >+ uint32_t libsandboxVersion; >+ uint32_t headerSize; >+ uint32_t builtinSize; // If a builtin doesn't exist, this is UINT_MAX. >+ uint32_t dataSize; >+}; >+// The file is layed out on disk like: >+// byte 0 >+// CachedSandboxHeader <- sizeof(CachedSandboxHeader) bytes >+// SandboxHeader <- CachedSandboxHeader::headerSize bytes >+// [SandboxBuiltin] optional. Present if CachedSandboxHeader::builtinSize is not UINT_MAX. If present, builtinSize bytes (not including null termination). >+// SandboxData <- CachedSandboxHeader::dataSize bytes >+// byte N >+ >+struct SandboxInfo { >+ SandboxInfo(const String& parentDirectoryPath, const String& directoryPath, const String& filePath, const SandboxParametersPtr& sandboxParameters, const CString& header, const ChildProcess::ProcessType& processType, const SandboxInitializationParameters& initializationParameters, const String& profileOrProfilePath, bool isProfilePath) >+ : parentDirectoryPath { parentDirectoryPath } >+ , directoryPath { directoryPath } >+ , filePath { filePath } >+ , sandboxParameters { sandboxParameters } >+ , header { header } >+ , processType { processType } >+ , initializationParameters { initializationParameters } >+ , profileOrProfilePath { profileOrProfilePath } >+ , isProfilePath { isProfilePath } >+ { >+ } >+ >+ const String& parentDirectoryPath; >+ const String& directoryPath; >+ const String& filePath; >+ const SandboxParametersPtr& sandboxParameters; >+ const CString& header; >+ const ChildProcess::ProcessType& processType; >+ const SandboxInitializationParameters& initializationParameters; >+ const String& profileOrProfilePath; >+ const bool isProfilePath; >+}; >+ >+constexpr uint32_t CachedSandboxVersionNumber = 0; >+#endif // USE(CACHE_COMPILED_SANDBOX) >+ >+static void initializeTimerCoalescingPolicy() >+{ >+ // Set task_latency and task_throughput QOS tiers as appropriate for a visible application. >+ struct task_qos_policy qosinfo = { LATENCY_QOS_TIER_0, THROUGHPUT_QOS_TIER_0 }; >+ kern_return_t kr = task_policy_set(mach_task_self(), TASK_BASE_QOS_POLICY, (task_policy_t)&qosinfo, TASK_QOS_POLICY_COUNT); >+ ASSERT_UNUSED(kr, kr == KERN_SUCCESS); >+} >+ >+void ChildProcess::launchServicesCheckIn() >+{ >+ _LSSetApplicationLaunchServicesServerConnectionStatus(0, 0); >+ RetainPtr<CFDictionaryRef> unused = _LSApplicationCheckIn(kLSDefaultSessionID, CFBundleGetInfoDictionary(CFBundleGetMainBundle())); >+} >+ >+void ChildProcess::platformInitialize() >+{ >+ initializeTimerCoalescingPolicy(); >+ [[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] bundlePath]]; >+} >+ >+static OSStatus enableSandboxStyleFileQuarantine() >+{ >+#if !PLATFORM(IOSMAC) >+ qtn_proc_t quarantineProperties = qtn_proc_alloc(); >+ auto quarantinePropertiesDeleter = makeScopeExit([quarantineProperties]() { >+ qtn_proc_free(quarantineProperties); >+ }); >+ >+ >+ if (qtn_proc_init_with_self(quarantineProperties)) { >+ // See <rdar://problem/13463752>. >+ qtn_proc_init(quarantineProperties); >+ } >+ >+ if (auto error = qtn_proc_set_flags(quarantineProperties, QTN_FLAG_SANDBOX)) >+ return error; >+ >+ // QTN_FLAG_SANDBOX is silently ignored if security.mac.qtn.sandbox_enforce sysctl is 0. >+ // In that case, quarantine falls back to advisory QTN_FLAG_DOWNLOAD. >+ return qtn_proc_apply_to_self(quarantineProperties); >+#else >+ return false; >+#endif >+} >+ >+#if USE(CACHE_COMPILED_SANDBOX) >+static Optional<Vector<char>> fileContents(const String& path, bool shouldLock = false, OptionSet<FileSystem::FileLockMode> lockMode = FileSystem::FileLockMode::Exclusive) >+{ >+ FileHandle file = shouldLock ? FileHandle(path, FileSystem::FileOpenMode::Read, lockMode) : FileHandle(path, FileSystem::FileOpenMode::Read); >+ file.open(); >+ if (!file) >+ return WTF::nullopt; >+ >+ char chunk[4096]; >+ constexpr size_t chunkSize = WTF_ARRAY_LENGTH(chunk); >+ size_t contentSize = 0; >+ Vector<char> contents; >+ contents.reserveInitialCapacity(chunkSize); >+ while (size_t bytesRead = file.read(chunk, chunkSize)) { >+ contents.append(chunk, bytesRead); >+ contentSize += bytesRead; >+ } >+ contents.resize(contentSize); >+ >+ return contents; >+} >+ >+#if USE(APPLE_INTERNAL_SDK) >+// These strings must match the last segment of the "com.apple.rootless.storage.<this part must match>" entry in each >+// process's restricted entitlements file (ex. Configurations/Networking-OSX-restricted.entitlements). >+constexpr const char* processStorageClass(ChildProcess::ProcessType type) >+{ >+ switch (type) { >+ case ChildProcess::ProcessType::WebContent: >+ return "WebKitWebContentSandbox"; >+ case ChildProcess::ProcessType::Network: >+ return "WebKitNetworkingSandbox"; >+ case ChildProcess::ProcessType::Plugin: >+ return "WebKitPluginSandbox"; >+ } >+} >+#endif // USE(APPLE_INTERNAL_SDK) >+ >+static Optional<CString> setAndSerializeSandboxParameters(const SandboxInitializationParameters& initializationParameters, const SandboxParametersPtr& sandboxParameters, const String& profileOrProfilePath, bool isProfilePath) >+{ >+ StringBuilder builder; >+ for (size_t i = 0; i < initializationParameters.count(); ++i) { >+ const char* name = initializationParameters.name(i); >+ const char* value = initializationParameters.value(i); >+ if (sandbox_set_param(sandboxParameters.get(), name, value)) { >+ WTFLogAlways("%s: Could not set sandbox parameter: %s\n", getprogname(), strerror(errno)); >+ CRASH(); >+ } >+ builder.append(name, strlen(name)); >+ builder.append(':'); >+ builder.append(value, strlen(value)); >+ builder.append(':'); >+ } >+ if (isProfilePath) { >+ auto contents = fileContents(profileOrProfilePath); >+ if (!contents) >+ return WTF::nullopt; >+ builder.append(contents->data(), contents->size()); >+ } else >+ builder.append(profileOrProfilePath); >+ return builder.toString().ascii(); >+} >+ >+static String sandboxDataVaultParentDirectory() >+{ >+ char temp[PATH_MAX]; >+ size_t length = confstr(_CS_DARWIN_USER_CACHE_DIR, temp, sizeof(temp)); >+ if (!length) { >+ WTFLogAlways("%s: Could not retrieve user cache directory path: %s\n", getprogname(), strerror(errno)); >+ exit(EX_NOPERM); >+ } >+ RELEASE_ASSERT(length <= sizeof(temp)); >+ char resolvedPath[PATH_MAX]; >+ if (!realpath(temp, resolvedPath)) { >+ WTFLogAlways("%s: Could not canonicalize user cache directory path: %s\n", getprogname(), strerror(errno)); >+ exit(EX_NOPERM); >+ } >+ return resolvedPath; >+} >+ >+static String sandboxDirectory(ChildProcess::ProcessType processType, const String& parentDirectory) >+{ >+ StringBuilder directory; >+ directory.append(parentDirectory); >+ switch (processType) { >+ case ChildProcess::ProcessType::WebContent: >+ directory.append("/com.apple.WebKit.WebContent.Sandbox"); >+ break; >+ case ChildProcess::ProcessType::Network: >+ directory.append("/com.apple.WebKit.Networking.Sandbox"); >+ break; >+ case ChildProcess::ProcessType::Plugin: >+ directory.append("/com.apple.WebKit.Plugin.Sandbox"); >+ break; >+ } >+ >+#if !USE(APPLE_INTERNAL_SDK) >+ // Add .OpenSource suffix so that open source builds don't try to access a data vault used by system Safari. >+ directory.append(".OpenSource"); >+#endif >+ >+ return directory.toString(); >+} >+ >+static String sandboxFilePath(const String& directoryPath, const CString& header) >+{ >+ StringBuilder sandboxFile; >+ sandboxFile.append(directoryPath); >+ sandboxFile.append("/CompiledSandbox+"); >+ >+ // Make the filename semi-unique based on the contents of the header. >+ auto crypto = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_256); >+ crypto->addBytes(header.data(), header.length()); >+ Vector<uint8_t> hash = crypto->computeHash(); >+ String readableHash = WTF::base64URLEncode(hash.data(), hash.size()); >+ >+ sandboxFile.append(readableHash); >+ return sandboxFile.toString(); >+} >+ >+static bool ensureSandboxCacheDirectory(const SandboxInfo& info) >+{ >+ if (!FileSystem::fileIsDirectory(info.parentDirectoryPath, FileSystem::ShouldFollowSymbolicLinks::Yes)) { >+ FileSystem::makeAllDirectories(info.parentDirectoryPath); >+ if (!FileSystem::fileIsDirectory(info.parentDirectoryPath, FileSystem::ShouldFollowSymbolicLinks::Yes)) { >+ WTFLogAlways("%s: Could not create sandbox directory\n", getprogname()); >+ return false; >+ } >+ } >+ >+#if USE(APPLE_INTERNAL_SDK) >+ const char* storageClass = processStorageClass(info.processType); >+ CString directoryPath = FileSystem::fileSystemRepresentation(info.directoryPath); >+ if (directoryPath.isNull()) >+ return false; >+ >+ auto makeDataVault = [&] { >+ do { >+ if (!rootless_mkdir_datavault(directoryPath.data(), 0700, storageClass)) >+ return true; >+ } while (errno == EAGAIN); >+ return false; >+ }; >+ >+ if (makeDataVault()) >+ return true; >+ >+ if (errno == EEXIST) { >+ // The directory already exists. First we'll check if it is a data vault. If it is then >+ // we are the ones who created it and we can continue. If it is not a datavault then we'll just >+ // delete it and try to make a new one. >+ if (!rootless_check_datavault_flag(directoryPath.data(), storageClass)) >+ return true; >+ >+ bool isDirectory = FileSystem::fileIsDirectory(info.directoryPath, FileSystem::ShouldFollowSymbolicLinks::No); >+ if (isDirectory) { >+ if (!FileSystem::deleteNonEmptyDirectory(info.directoryPath)) >+ return false; >+ } else { >+ if (!FileSystem::deleteFile(info.directoryPath)) >+ return false; >+ } >+ >+ if (!makeDataVault()) >+ return false; >+ } else { >+ WTFLogAlways("%s: Sandbox directory couldn't be created: ", getprogname(), strerror(errno)); >+ return false; >+ } >+#else >+ bool hasSandboxDirectory = FileSystem::fileIsDirectory(info.directoryPath, FileSystem::ShouldFollowSymbolicLinks::Yes); >+ if (!hasSandboxDirectory) { >+ if (FileSystem::makeAllDirectories(info.directoryPath)) { >+ ASSERT(FileSystem::fileIsDirectory(info.directoryPath, FileSystem::ShouldFollowSymbolicLinks::Yes)); >+ hasSandboxDirectory = true; >+ } else { >+ // We may have raced with someone else making it. That's ok. >+ hasSandboxDirectory = FileSystem::fileIsDirectory(info.directoryPath, FileSystem::ShouldFollowSymbolicLinks::Yes); >+ } >+ } >+ >+ if (!hasSandboxDirectory) { >+ // Bailing because we don't have a sandbox directory. >+ return false; >+ } >+#endif // USE(APPLE_INTERNAL_SDK) >+ >+ return true; >+} >+ >+static bool writeSandboxDataToCacheFile(const SandboxInfo& info, const Vector<char>& cacheFile) >+{ >+ FileHandle file { info.filePath, FileSystem::FileOpenMode::Write, FileSystem::FileLockMode::Exclusive }; >+ return file.write(cacheFile.data(), cacheFile.size()) == safeCast<int>(cacheFile.size()); >+} >+ >+static SandboxProfilePtr compileAndCacheSandboxProfile(const SandboxInfo& info) >+{ >+ if (!ensureSandboxCacheDirectory(info)) >+ return nullptr; >+ >+ char* error = nullptr; >+ CString profileOrProfilePath = info.isProfilePath ? FileSystem::fileSystemRepresentation(info.profileOrProfilePath) : info.profileOrProfilePath.utf8(); >+ if (profileOrProfilePath.isNull()) >+ return nullptr; >+ SandboxProfilePtr sandboxProfile { info.isProfilePath ? sandbox_compile_file(profileOrProfilePath.data(), info.sandboxParameters.get(), &error) : sandbox_compile_string(profileOrProfilePath.data(), info.sandboxParameters.get(), &error) }; >+ if (!sandboxProfile) { >+ WTFLogAlways("%s: Could not compile WebContent sandbox: %s\n", getprogname(), error); >+ return nullptr; >+ } >+ >+ const bool haveBuiltin = sandboxProfile->builtin; >+ int32_t libsandboxVersion = NSVersionOfRunTimeLibrary("sandbox"); >+ RELEASE_ASSERT(libsandboxVersion > 0); >+ CachedSandboxHeader cachedHeader { >+ CachedSandboxVersionNumber, >+ static_cast<uint32_t>(libsandboxVersion), >+ safeCast<uint32_t>(info.header.length()), >+ haveBuiltin ? safeCast<uint32_t>(strlen(sandboxProfile->builtin)) : std::numeric_limits<uint32_t>::max(), >+ safeCast<uint32_t>(sandboxProfile->size) >+ }; >+ const size_t expectedFileSize = sizeof(cachedHeader) + cachedHeader.headerSize + (haveBuiltin ? cachedHeader.builtinSize : 0) + cachedHeader.dataSize; >+ >+ Vector<char> cacheFile; >+ cacheFile.reserveInitialCapacity(expectedFileSize); >+ cacheFile.append(bitwise_cast<uint8_t*>(&cachedHeader), sizeof(CachedSandboxHeader)); >+ cacheFile.append(info.header.data(), info.header.length()); >+ if (haveBuiltin) >+ cacheFile.append(sandboxProfile->builtin, cachedHeader.builtinSize); >+ cacheFile.append(sandboxProfile->data, cachedHeader.dataSize); >+ >+ if (!writeSandboxDataToCacheFile(info, cacheFile)) >+ WTFLogAlways("%s: Unable to cache compiled sandbox\n", getprogname()); >+ >+ return sandboxProfile; >+} >+ >+static bool tryApplyCachedSandbox(const SandboxInfo& info) >+{ >+#if USE(APPLE_INTERNAL_SDK) >+ CString directoryPath = FileSystem::fileSystemRepresentation(info.directoryPath); >+ if (directoryPath.isNull()) >+ return false; >+ if (rootless_check_datavault_flag(directoryPath.data(), processStorageClass(info.processType))) >+ return false; >+#endif >+ >+ auto contents = fileContents(info.filePath, true, FileSystem::FileLockMode::Shared); >+ if (!contents || contents->isEmpty()) >+ return false; >+ Vector<char> cachedSandboxContents = WTFMove(*contents); >+ if (sizeof(CachedSandboxHeader) > cachedSandboxContents.size()) >+ return false; >+ >+ // This data may be corrupted if the sandbox file was cached on a different platform with different endianness >+ CachedSandboxHeader cachedSandboxHeader; >+ memcpy(&cachedSandboxHeader, cachedSandboxContents.data(), sizeof(CachedSandboxHeader)); >+ int32_t libsandboxVersion = NSVersionOfRunTimeLibrary("sandbox"); >+ RELEASE_ASSERT(libsandboxVersion > 0); >+ if (static_cast<uint32_t>(libsandboxVersion) != cachedSandboxHeader.libsandboxVersion) >+ return false; >+ if (cachedSandboxHeader.versionNumber != CachedSandboxVersionNumber) >+ return false; >+ const bool haveBuiltin = cachedSandboxHeader.builtinSize != std::numeric_limits<uint32_t>::max(); >+ >+ // These values are computed based on the disk layout specified below the definition of the CachedSandboxHeader struct >+ // and must be changed if the layout changes. >+ const char* sandboxHeaderPtr = bitwise_cast<char *>(cachedSandboxContents.data()) + sizeof(CachedSandboxHeader); >+ const char* sandboxBuiltinPtr = sandboxHeaderPtr + cachedSandboxHeader.headerSize; >+ unsigned char* sandboxDataPtr = bitwise_cast<unsigned char*>(haveBuiltin ? sandboxBuiltinPtr + cachedSandboxHeader.builtinSize : sandboxBuiltinPtr); >+ >+ size_t expectedFileSize = sizeof(CachedSandboxHeader) + cachedSandboxHeader.headerSize + cachedSandboxHeader.dataSize; >+ if (haveBuiltin) >+ expectedFileSize += cachedSandboxHeader.builtinSize; >+ if (cachedSandboxContents.size() != expectedFileSize) >+ return false; >+ if (cachedSandboxHeader.headerSize != info.header.length()) >+ return false; >+ if (memcmp(sandboxHeaderPtr, info.header.data(), info.header.length())) >+ return false; >+ >+ SandboxProfile profile { }; >+ CString builtin; >+ profile.builtin = nullptr; >+ profile.size = cachedSandboxHeader.dataSize; >+ if (haveBuiltin) { >+ builtin = CString::newUninitialized(cachedSandboxHeader.builtinSize, profile.builtin); >+ if (builtin.isNull()) >+ return false; >+ memcpy(profile.builtin, sandboxBuiltinPtr, cachedSandboxHeader.builtinSize); >+ } >+ ASSERT(static_cast<void *>(sandboxDataPtr + profile.size) <= static_cast<void *>(cachedSandboxContents.data() + cachedSandboxContents.size())); >+ profile.data = sandboxDataPtr; >+ >+ if (sandbox_apply(&profile)) { >+ WTFLogAlways("%s: Could not apply cached sandbox: %s\n", getprogname(), strerror(errno)); >+ return false; >+ } >+ >+ return true; >+} >+#endif // USE(CACHE_COMPILED_SANDBOX) >+ >+static inline const NSBundle *webKit2Bundle() >+{ >+#if WK_API_ENABLED >+ const static NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")]; >+#else >+ const static NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(@"WKView")]; >+#endif >+ >+ return bundle; >+} >+ >+static void getSandboxProfileOrProfilePath(const SandboxInitializationParameters& parameters, String& profileOrProfilePath, bool& isProfilePath) >+{ >+ switch (parameters.mode()) { >+ case SandboxInitializationParameters::ProfileSelectionMode::UseDefaultSandboxProfilePath: >+ profileOrProfilePath = [webKit2Bundle() pathForResource:[[NSBundle mainBundle] bundleIdentifier] ofType:@"sb"]; >+ isProfilePath = true; >+ return; >+ case SandboxInitializationParameters::ProfileSelectionMode::UseOverrideSandboxProfilePath: >+ profileOrProfilePath = parameters.overrideSandboxProfilePath(); >+ isProfilePath = true; >+ return; >+ case SandboxInitializationParameters::ProfileSelectionMode::UseSandboxProfile: >+ profileOrProfilePath = parameters.sandboxProfile(); >+ isProfilePath = false; >+ return; >+ } >+} >+ >+static bool compileAndApplySandboxSlowCase(const String& profileOrProfilePath, bool isProfilePath, const SandboxInitializationParameters& parameters) >+{ >+ char* errorBuf; >+ CString temp = isProfilePath ? FileSystem::fileSystemRepresentation(profileOrProfilePath) : profileOrProfilePath.utf8(); >+ uint64_t flags = isProfilePath ? SANDBOX_NAMED_EXTERNAL : 0; >+ ALLOW_DEPRECATED_DECLARATIONS_BEGIN >+ if (sandbox_init_with_parameters(temp.data(), flags, parameters.namedParameterArray(), &errorBuf)) { >+ ALLOW_DEPRECATED_DECLARATIONS_END >+ WTFLogAlways("%s: Could not initialize sandbox profile [%s], error '%s'\n", getprogname(), temp.data(), errorBuf); >+ for (size_t i = 0, count = parameters.count(); i != count; ++i) >+ WTFLogAlways("%s=%s\n", parameters.name(i), parameters.value(i)); >+ return false; >+ } >+ return true; >+} >+ >+static bool applySandbox(const ChildProcessInitializationParameters& parameters, const SandboxInitializationParameters& sandboxInitializationParameters, const String& dataVaultParentDirectory) >+{ >+ String profileOrProfilePath; >+ bool isProfilePath; >+ getSandboxProfileOrProfilePath(sandboxInitializationParameters, profileOrProfilePath, isProfilePath); >+ if (profileOrProfilePath.isEmpty()) { >+ WTFLogAlways("%s: Profile path is invalid\n", getprogname()); >+ CRASH(); >+ } >+ >+#if USE(CACHE_COMPILED_SANDBOX) >+ // The plugin process's DARWIN_USER_TEMP_DIR and DARWIN_USER_CACHE_DIR sandbox parameters are randomized so >+ // so the compiled sandbox should not be cached because it won't be reused. >+ if (parameters.processType == ChildProcess::ProcessType::Plugin) >+ return compileAndApplySandboxSlowCase(profileOrProfilePath, isProfilePath, sandboxInitializationParameters); >+ >+ SandboxParametersPtr sandboxParameters { sandbox_create_params() }; >+ if (!sandboxParameters) { >+ WTFLogAlways("%s: Could not create sandbox parameters\n", getprogname()); >+ CRASH(); >+ } >+ auto header = setAndSerializeSandboxParameters(sandboxInitializationParameters, sandboxParameters, profileOrProfilePath, isProfilePath); >+ if (!header) { >+ WTFLogAlways("%s: Sandbox parameters are invalid\n", getprogname()); >+ CRASH(); >+ } >+ >+ String directoryPath { sandboxDirectory(parameters.processType, dataVaultParentDirectory) }; >+ String filePath = sandboxFilePath(directoryPath, *header); >+ SandboxInfo info { >+ dataVaultParentDirectory, >+ directoryPath, >+ filePath, >+ sandboxParameters, >+ *header, >+ parameters.processType, >+ sandboxInitializationParameters, >+ profileOrProfilePath, >+ isProfilePath >+ }; >+ >+ if (tryApplyCachedSandbox(info)) >+ return true; >+ >+ SandboxProfilePtr sandboxProfile = compileAndCacheSandboxProfile(info); >+ if (!sandboxProfile) >+ return compileAndApplySandboxSlowCase(profileOrProfilePath, isProfilePath, sandboxInitializationParameters); >+ >+ if (sandbox_apply(sandboxProfile.get())) { >+ WTFLogAlways("%s: Could not apply compiled sandbox: %s\n", getprogname(), strerror(errno)); >+ CRASH(); >+ } >+ >+ return true; >+#else >+ UNUSED_PARAM(parameters); >+ UNUSED_PARAM(dataVaultParentDirectory); >+ return compileAndApplySandboxSlowCase(profileOrProfilePath, isProfilePath, sandboxInitializationParameters); >+#endif // USE(CACHE_COMPILED_SANDBOX) >+} >+ >+static void initializeSandboxParameters(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >+{ >+ // Verify user directory suffix. >+ if (sandboxParameters.userDirectorySuffix().isNull()) { >+ auto userDirectorySuffix = parameters.extraInitializationData.find("user-directory-suffix"); >+ if (userDirectorySuffix != parameters.extraInitializationData.end()) >+ sandboxParameters.setUserDirectorySuffix([makeString(userDirectorySuffix->value, '/', String([[NSBundle mainBundle] bundleIdentifier])) fileSystemRepresentation]); >+ else { >+ String clientIdentifier = codeSigningIdentifier(parameters.connectionIdentifier.xpcConnection.get()); >+ if (clientIdentifier.isNull()) >+ clientIdentifier = parameters.clientIdentifier; >+ String defaultUserDirectorySuffix = makeString(String([[NSBundle mainBundle] bundleIdentifier]), '+', clientIdentifier); >+ sandboxParameters.setUserDirectorySuffix(defaultUserDirectorySuffix); >+ } >+ } >+ >+ String osSystemMarketingVersion = systemMarketingVersion(); >+ Vector<String> osVersionParts = osSystemMarketingVersion.split('.'); >+ if (osVersionParts.size() < 2) { >+ WTFLogAlways("%s: Couldn't find OS Version\n", getprogname()); >+ exit(EX_NOPERM); >+ } >+ String osVersion = osVersionParts[0] + '.' + osVersionParts[1]; >+ sandboxParameters.addParameter("_OS_VERSION", osVersion.utf8().data()); >+ >+ // Use private temporary and cache directories. >+ setenv("DIRHELPER_USER_DIR_SUFFIX", FileSystem::fileSystemRepresentation(sandboxParameters.userDirectorySuffix()).data(), 1); >+ char temporaryDirectory[PATH_MAX]; >+ if (!confstr(_CS_DARWIN_USER_TEMP_DIR, temporaryDirectory, sizeof(temporaryDirectory))) { >+ WTFLogAlways("%s: couldn't retrieve private temporary directory path: %d\n", getprogname(), errno); >+ exit(EX_NOPERM); >+ } >+ setenv("TMPDIR", temporaryDirectory, 1); >+ >+ sandboxParameters.addPathParameter("WEBKIT2_FRAMEWORK_DIR", [[webKit2Bundle() bundlePath] stringByDeletingLastPathComponent]); >+ sandboxParameters.addConfDirectoryParameter("DARWIN_USER_TEMP_DIR", _CS_DARWIN_USER_TEMP_DIR); >+ sandboxParameters.addConfDirectoryParameter("DARWIN_USER_CACHE_DIR", _CS_DARWIN_USER_CACHE_DIR); >+ >+ char buffer[4096]; >+ int bufferSize = sizeof(buffer); >+ struct passwd pwd; >+ struct passwd* result = 0; >+ if (getpwuid_r(getuid(), &pwd, buffer, bufferSize, &result) || !result) { >+ WTFLogAlways("%s: Couldn't find home directory\n", getprogname()); >+ exit(EX_NOPERM); >+ } >+ >+ sandboxParameters.addPathParameter("HOME_DIR", pwd.pw_dir); >+ String path = String::fromUTF8(pwd.pw_dir); >+ path.append("/Library"); >+ sandboxParameters.addPathParameter("HOME_LIBRARY_DIR", FileSystem::fileSystemRepresentation(path).data()); >+ path.append("/Preferences"); >+ sandboxParameters.addPathParameter("HOME_LIBRARY_PREFERENCES_DIR", FileSystem::fileSystemRepresentation(path).data()); >+} >+ >+void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >+{ >+ TraceScope traceScope(InitializeSandboxStart, InitializeSandboxEnd); >+ >+#if USE(CACHE_COMPILED_SANDBOX) >+ // This must be called before initializeSandboxParameters so that the path does not include the user directory suffix. >+ // We don't want the user directory suffix because we want all processes of the same type to use the same cache directory. >+ String dataVaultParentDirectory { sandboxDataVaultParentDirectory() }; >+#else >+ String dataVaultParentDirectory; >+#endif >+ >+ initializeSandboxParameters(parameters, sandboxParameters); >+ >+ if (!applySandbox(parameters, sandboxParameters, dataVaultParentDirectory)) { >+ WTFLogAlways("%s: Unable to apply sandbox\n", getprogname()); >+ CRASH(); >+ } >+ >+ if (shouldOverrideQuarantine()) { >+ // This will override LSFileQuarantineEnabled from Info.plist unless sandbox quarantine is globally disabled. >+ OSStatus error = enableSandboxStyleFileQuarantine(); >+ if (error) { >+ WTFLogAlways("%s: Couldn't enable sandbox style file quarantine: %ld\n", getprogname(), static_cast<long>(error)); >+ exit(EX_NOPERM); >+ } >+ } >+} >+ >+#if USE(APPKIT) >+void ChildProcess::stopNSAppRunLoop() >+{ >+ ASSERT([NSApp isRunning]); >+ [NSApp stop:nil]; >+ >+ NSEvent *event = [NSEvent otherEventWithType:NSEventTypeApplicationDefined location:NSMakePoint(0, 0) modifierFlags:0 timestamp:0.0 windowNumber:0 context:nil subtype:0 data1:0 data2:0]; >+ [NSApp postEvent:event atStart:true]; >+} >+#endif >+ >+#if !PLATFORM(IOSMAC) && ENABLE(WEBPROCESS_NSRUNLOOP) >+void ChildProcess::stopNSRunLoop() >+{ >+ ASSERT([NSRunLoop mainRunLoop]); >+ [[NSRunLoop mainRunLoop] performBlock:^{ >+ exit(0); >+ }]; >+} >+#endif >+ >+#if PLATFORM(IOSMAC) >+void ChildProcess::platformStopRunLoop() >+{ >+ XPCServiceExit(WTFMove(m_priorityBoostMessage)); >+} >+#endif >+ >+void ChildProcess::setQOS(int latencyQOS, int throughputQOS) >+{ >+ if (!latencyQOS && !throughputQOS) >+ return; >+ >+ struct task_qos_policy qosinfo = { >+ latencyQOS ? LATENCY_QOS_TIER_0 + latencyQOS - 1 : LATENCY_QOS_TIER_UNSPECIFIED, >+ throughputQOS ? THROUGHPUT_QOS_TIER_0 + throughputQOS - 1 : THROUGHPUT_QOS_TIER_UNSPECIFIED >+ }; >+ >+ task_policy_set(mach_task_self(), TASK_OVERRIDE_QOS_POLICY, (task_policy_t)&qosinfo, TASK_QOS_POLICY_COUNT); >+} >+ >+#if PLATFORM(MAC) >+bool ChildProcess::isSystemWebKit() >+{ >+ static bool isSystemWebKit = [] { >+ return [[webKit2Bundle() bundlePath] hasPrefix:@"/System/"]; >+ }(); >+ return isSystemWebKit; >+} >+#endif >+ >+} // namespace WebKit >+ >+#endif >Index: Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm >=================================================================== >--- Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm (revision 240589) >+++ Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm (working copy) >@@ -26,7 +26,7 @@ > #import "config.h" > > #if PLATFORM(MAC) || PLATFORM(IOSMAC) >-#import "ChildProcess.h" >+#import "AuxiliaryProcess.h" > > #import "CodeSigning.h" > #import "QuarantineSPI.h" >@@ -114,7 +114,7 @@ struct CachedSandboxHeader { > // byte N > > struct SandboxInfo { >- SandboxInfo(const String& parentDirectoryPath, const String& directoryPath, const String& filePath, const SandboxParametersPtr& sandboxParameters, const CString& header, const ChildProcess::ProcessType& processType, const SandboxInitializationParameters& initializationParameters, const String& profileOrProfilePath, bool isProfilePath) >+ SandboxInfo(const String& parentDirectoryPath, const String& directoryPath, const String& filePath, const SandboxParametersPtr& sandboxParameters, const CString& header, const AuxiliaryProcess::ProcessType& processType, const SandboxInitializationParameters& initializationParameters, const String& profileOrProfilePath, bool isProfilePath) > : parentDirectoryPath { parentDirectoryPath } > , directoryPath { directoryPath } > , filePath { filePath } >@@ -132,7 +132,7 @@ struct SandboxInfo { > const String& filePath; > const SandboxParametersPtr& sandboxParameters; > const CString& header; >- const ChildProcess::ProcessType& processType; >+ const AuxiliaryProcess::ProcessType& processType; > const SandboxInitializationParameters& initializationParameters; > const String& profileOrProfilePath; > const bool isProfilePath; >@@ -149,13 +149,13 @@ static void initializeTimerCoalescingPol > ASSERT_UNUSED(kr, kr == KERN_SUCCESS); > } > >-void ChildProcess::launchServicesCheckIn() >+void AuxiliaryProcess::launchServicesCheckIn() > { > _LSSetApplicationLaunchServicesServerConnectionStatus(0, 0); > RetainPtr<CFDictionaryRef> unused = _LSApplicationCheckIn(kLSDefaultSessionID, CFBundleGetInfoDictionary(CFBundleGetMainBundle())); > } > >-void ChildProcess::platformInitialize() >+void AuxiliaryProcess::platformInitialize() > { > initializeTimerCoalescingPolicy(); > [[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] bundlePath]]; >@@ -211,14 +211,14 @@ static Optional<Vector<char>> fileConten > #if USE(APPLE_INTERNAL_SDK) > // These strings must match the last segment of the "com.apple.rootless.storage.<this part must match>" entry in each > // process's restricted entitlements file (ex. Configurations/Networking-OSX-restricted.entitlements). >-constexpr const char* processStorageClass(ChildProcess::ProcessType type) >+constexpr const char* processStorageClass(AuxiliaryProcess::ProcessType type) > { > switch (type) { >- case ChildProcess::ProcessType::WebContent: >+ case AuxiliaryProcess::ProcessType::WebContent: > return "WebKitWebContentSandbox"; >- case ChildProcess::ProcessType::Network: >+ case AuxiliaryProcess::ProcessType::Network: > return "WebKitNetworkingSandbox"; >- case ChildProcess::ProcessType::Plugin: >+ case AuxiliaryProcess::ProcessType::Plugin: > return "WebKitPluginSandbox"; > } > } >@@ -266,18 +266,18 @@ static String sandboxDataVaultParentDire > return resolvedPath; > } > >-static String sandboxDirectory(ChildProcess::ProcessType processType, const String& parentDirectory) >+static String sandboxDirectory(AuxiliaryProcess::ProcessType processType, const String& parentDirectory) > { > StringBuilder directory; > directory.append(parentDirectory); > switch (processType) { >- case ChildProcess::ProcessType::WebContent: >+ case AuxiliaryProcess::ProcessType::WebContent: > directory.append("/com.apple.WebKit.WebContent.Sandbox"); > break; >- case ChildProcess::ProcessType::Network: >+ case AuxiliaryProcess::ProcessType::Network: > directory.append("/com.apple.WebKit.Networking.Sandbox"); > break; >- case ChildProcess::ProcessType::Plugin: >+ case AuxiliaryProcess::ProcessType::Plugin: > directory.append("/com.apple.WebKit.Plugin.Sandbox"); > break; > } >@@ -534,7 +534,7 @@ static bool compileAndApplySandboxSlowCa > return true; > } > >-static bool applySandbox(const ChildProcessInitializationParameters& parameters, const SandboxInitializationParameters& sandboxInitializationParameters, const String& dataVaultParentDirectory) >+static bool applySandbox(const AuxiliaryProcessInitializationParameters& parameters, const SandboxInitializationParameters& sandboxInitializationParameters, const String& dataVaultParentDirectory) > { > String profileOrProfilePath; > bool isProfilePath; >@@ -547,7 +547,7 @@ static bool applySandbox(const ChildProc > #if USE(CACHE_COMPILED_SANDBOX) > // The plugin process's DARWIN_USER_TEMP_DIR and DARWIN_USER_CACHE_DIR sandbox parameters are randomized so > // so the compiled sandbox should not be cached because it won't be reused. >- if (parameters.processType == ChildProcess::ProcessType::Plugin) >+ if (parameters.processType == AuxiliaryProcess::ProcessType::Plugin) > return compileAndApplySandboxSlowCase(profileOrProfilePath, isProfilePath, sandboxInitializationParameters); > > SandboxParametersPtr sandboxParameters { sandbox_create_params() }; >@@ -595,7 +595,7 @@ static bool applySandbox(const ChildProc > #endif // USE(CACHE_COMPILED_SANDBOX) > } > >-static void initializeSandboxParameters(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >+static void initializeSandboxParameters(const AuxiliaryProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) > { > // Verify user directory suffix. > if (sandboxParameters.userDirectorySuffix().isNull()) { >@@ -650,7 +650,7 @@ static void initializeSandboxParameters( > sandboxParameters.addPathParameter("HOME_LIBRARY_PREFERENCES_DIR", FileSystem::fileSystemRepresentation(path).data()); > } > >-void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >+void AuxiliaryProcess::initializeSandbox(const AuxiliaryProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) > { > TraceScope traceScope(InitializeSandboxStart, InitializeSandboxEnd); > >@@ -680,7 +680,7 @@ void ChildProcess::initializeSandbox(con > } > > #if USE(APPKIT) >-void ChildProcess::stopNSAppRunLoop() >+void AuxiliaryProcess::stopNSAppRunLoop() > { > ASSERT([NSApp isRunning]); > [NSApp stop:nil]; >@@ -691,7 +691,7 @@ void ChildProcess::stopNSAppRunLoop() > #endif > > #if !PLATFORM(IOSMAC) && ENABLE(WEBPROCESS_NSRUNLOOP) >-void ChildProcess::stopNSRunLoop() >+void AuxiliaryProcess::stopNSRunLoop() > { > ASSERT([NSRunLoop mainRunLoop]); > [[NSRunLoop mainRunLoop] performBlock:^{ >@@ -701,13 +701,13 @@ void ChildProcess::stopNSRunLoop() > #endif > > #if PLATFORM(IOSMAC) >-void ChildProcess::platformStopRunLoop() >+void AuxiliaryProcess::platformStopRunLoop() > { > XPCServiceExit(WTFMove(m_priorityBoostMessage)); > } > #endif > >-void ChildProcess::setQOS(int latencyQOS, int throughputQOS) >+void AuxiliaryProcess::setQOS(int latencyQOS, int throughputQOS) > { > if (!latencyQOS && !throughputQOS) > return; >@@ -721,7 +721,7 @@ void ChildProcess::setQOS(int latencyQOS > } > > #if PLATFORM(MAC) >-bool ChildProcess::isSystemWebKit() >+bool AuxiliaryProcess::isSystemWebKit() > { > static bool isSystemWebKit = [] { > return [[webKit2Bundle() bundlePath] hasPrefix:@"/System/"]; >Index: Source/WebKit/Shared/mac/ChildProcessMac.mm >=================================================================== >--- Source/WebKit/Shared/mac/ChildProcessMac.mm (revision 240589) >+++ Source/WebKit/Shared/mac/ChildProcessMac.mm (nonexistent) >@@ -1,735 +0,0 @@ >-/* >- * Copyright (C) 2012-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" >- >-#if PLATFORM(MAC) || PLATFORM(IOSMAC) >-#import "ChildProcess.h" >- >-#import "CodeSigning.h" >-#import "QuarantineSPI.h" >-#import "SandboxInitializationParameters.h" >-#import "SandboxUtilities.h" >-#import "WKFoundation.h" >-#import "XPCServiceEntryPoint.h" >-#import <WebCore/FileHandle.h> >-#import <WebCore/SystemVersion.h> >-#import <mach-o/dyld.h> >-#import <mach/mach.h> >-#import <mach/task.h> >-#import <pal/crypto/CryptoDigest.h> >-#import <pal/spi/cocoa/LaunchServicesSPI.h> >-#import <pwd.h> >-#import <stdlib.h> >-#import <sys/sysctl.h> >-#import <sysexits.h> >-#import <wtf/DataLog.h> >-#import <wtf/FileSystem.h> >-#import <wtf/RandomNumber.h> >-#import <wtf/Scope.h> >-#import <wtf/SystemTracing.h> >-#import <wtf/WallTime.h> >-#import <wtf/spi/darwin/SandboxSPI.h> >-#import <wtf/text/Base64.h> >-#import <wtf/text/StringBuilder.h> >- >-#if USE(APPLE_INTERNAL_SDK) >-#import <ApplicationServices/ApplicationServicesPriv.h> >-#import <rootless.h> >-#endif >- >-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300 >-#define USE_CACHE_COMPILED_SANDBOX 1 >-#else >-#define USE_CACHE_COMPILED_SANDBOX 0 >-#endif >- >-#if PLATFORM(IOSMAC) && USE(APPLE_INTERNAL_SDK) >-enum LSSessionID { >- kLSDefaultSessionID = -2, >-}; >-#endif >- >-typedef bool (^LSServerConnectionAllowedBlock) ( CFDictionaryRef optionsRef ); >-extern "C" void _LSSetApplicationLaunchServicesServerConnectionStatus(uint64_t flags, LSServerConnectionAllowedBlock block); >-extern "C" CFDictionaryRef _LSApplicationCheckIn(LSSessionID sessionID, CFDictionaryRef applicationInfo); >- >-namespace WebKit { >-using namespace WebCore; >- >-#if USE(CACHE_COMPILED_SANDBOX) >-using SandboxProfile = typename std::remove_pointer<sandbox_profile_t>::type; >-struct SandboxProfileDeleter { >- void operator()(SandboxProfile* ptr) >- { >- sandbox_free_profile(ptr); >- } >-}; >-using SandboxProfilePtr = std::unique_ptr<SandboxProfile, SandboxProfileDeleter>; >- >-using SandboxParameters = typename std::remove_pointer<sandbox_params_t>::type; >-struct SandboxParametersDeleter { >- void operator()(SandboxParameters* ptr) >- { >- sandbox_free_params(ptr); >- } >-}; >-using SandboxParametersPtr = std::unique_ptr<SandboxParameters, SandboxParametersDeleter>; >- >-struct CachedSandboxHeader { >- uint32_t versionNumber; >- uint32_t libsandboxVersion; >- uint32_t headerSize; >- uint32_t builtinSize; // If a builtin doesn't exist, this is UINT_MAX. >- uint32_t dataSize; >-}; >-// The file is layed out on disk like: >-// byte 0 >-// CachedSandboxHeader <- sizeof(CachedSandboxHeader) bytes >-// SandboxHeader <- CachedSandboxHeader::headerSize bytes >-// [SandboxBuiltin] optional. Present if CachedSandboxHeader::builtinSize is not UINT_MAX. If present, builtinSize bytes (not including null termination). >-// SandboxData <- CachedSandboxHeader::dataSize bytes >-// byte N >- >-struct SandboxInfo { >- SandboxInfo(const String& parentDirectoryPath, const String& directoryPath, const String& filePath, const SandboxParametersPtr& sandboxParameters, const CString& header, const ChildProcess::ProcessType& processType, const SandboxInitializationParameters& initializationParameters, const String& profileOrProfilePath, bool isProfilePath) >- : parentDirectoryPath { parentDirectoryPath } >- , directoryPath { directoryPath } >- , filePath { filePath } >- , sandboxParameters { sandboxParameters } >- , header { header } >- , processType { processType } >- , initializationParameters { initializationParameters } >- , profileOrProfilePath { profileOrProfilePath } >- , isProfilePath { isProfilePath } >- { >- } >- >- const String& parentDirectoryPath; >- const String& directoryPath; >- const String& filePath; >- const SandboxParametersPtr& sandboxParameters; >- const CString& header; >- const ChildProcess::ProcessType& processType; >- const SandboxInitializationParameters& initializationParameters; >- const String& profileOrProfilePath; >- const bool isProfilePath; >-}; >- >-constexpr uint32_t CachedSandboxVersionNumber = 0; >-#endif // USE(CACHE_COMPILED_SANDBOX) >- >-static void initializeTimerCoalescingPolicy() >-{ >- // Set task_latency and task_throughput QOS tiers as appropriate for a visible application. >- struct task_qos_policy qosinfo = { LATENCY_QOS_TIER_0, THROUGHPUT_QOS_TIER_0 }; >- kern_return_t kr = task_policy_set(mach_task_self(), TASK_BASE_QOS_POLICY, (task_policy_t)&qosinfo, TASK_QOS_POLICY_COUNT); >- ASSERT_UNUSED(kr, kr == KERN_SUCCESS); >-} >- >-void ChildProcess::launchServicesCheckIn() >-{ >- _LSSetApplicationLaunchServicesServerConnectionStatus(0, 0); >- RetainPtr<CFDictionaryRef> unused = _LSApplicationCheckIn(kLSDefaultSessionID, CFBundleGetInfoDictionary(CFBundleGetMainBundle())); >-} >- >-void ChildProcess::platformInitialize() >-{ >- initializeTimerCoalescingPolicy(); >- [[NSFileManager defaultManager] changeCurrentDirectoryPath:[[NSBundle mainBundle] bundlePath]]; >-} >- >-static OSStatus enableSandboxStyleFileQuarantine() >-{ >-#if !PLATFORM(IOSMAC) >- qtn_proc_t quarantineProperties = qtn_proc_alloc(); >- auto quarantinePropertiesDeleter = makeScopeExit([quarantineProperties]() { >- qtn_proc_free(quarantineProperties); >- }); >- >- >- if (qtn_proc_init_with_self(quarantineProperties)) { >- // See <rdar://problem/13463752>. >- qtn_proc_init(quarantineProperties); >- } >- >- if (auto error = qtn_proc_set_flags(quarantineProperties, QTN_FLAG_SANDBOX)) >- return error; >- >- // QTN_FLAG_SANDBOX is silently ignored if security.mac.qtn.sandbox_enforce sysctl is 0. >- // In that case, quarantine falls back to advisory QTN_FLAG_DOWNLOAD. >- return qtn_proc_apply_to_self(quarantineProperties); >-#else >- return false; >-#endif >-} >- >-#if USE(CACHE_COMPILED_SANDBOX) >-static Optional<Vector<char>> fileContents(const String& path, bool shouldLock = false, OptionSet<FileSystem::FileLockMode> lockMode = FileSystem::FileLockMode::Exclusive) >-{ >- FileHandle file = shouldLock ? FileHandle(path, FileSystem::FileOpenMode::Read, lockMode) : FileHandle(path, FileSystem::FileOpenMode::Read); >- file.open(); >- if (!file) >- return WTF::nullopt; >- >- char chunk[4096]; >- constexpr size_t chunkSize = WTF_ARRAY_LENGTH(chunk); >- size_t contentSize = 0; >- Vector<char> contents; >- contents.reserveInitialCapacity(chunkSize); >- while (size_t bytesRead = file.read(chunk, chunkSize)) { >- contents.append(chunk, bytesRead); >- contentSize += bytesRead; >- } >- contents.resize(contentSize); >- >- return contents; >-} >- >-#if USE(APPLE_INTERNAL_SDK) >-// These strings must match the last segment of the "com.apple.rootless.storage.<this part must match>" entry in each >-// process's restricted entitlements file (ex. Configurations/Networking-OSX-restricted.entitlements). >-constexpr const char* processStorageClass(ChildProcess::ProcessType type) >-{ >- switch (type) { >- case ChildProcess::ProcessType::WebContent: >- return "WebKitWebContentSandbox"; >- case ChildProcess::ProcessType::Network: >- return "WebKitNetworkingSandbox"; >- case ChildProcess::ProcessType::Plugin: >- return "WebKitPluginSandbox"; >- } >-} >-#endif // USE(APPLE_INTERNAL_SDK) >- >-static Optional<CString> setAndSerializeSandboxParameters(const SandboxInitializationParameters& initializationParameters, const SandboxParametersPtr& sandboxParameters, const String& profileOrProfilePath, bool isProfilePath) >-{ >- StringBuilder builder; >- for (size_t i = 0; i < initializationParameters.count(); ++i) { >- const char* name = initializationParameters.name(i); >- const char* value = initializationParameters.value(i); >- if (sandbox_set_param(sandboxParameters.get(), name, value)) { >- WTFLogAlways("%s: Could not set sandbox parameter: %s\n", getprogname(), strerror(errno)); >- CRASH(); >- } >- builder.append(name, strlen(name)); >- builder.append(':'); >- builder.append(value, strlen(value)); >- builder.append(':'); >- } >- if (isProfilePath) { >- auto contents = fileContents(profileOrProfilePath); >- if (!contents) >- return WTF::nullopt; >- builder.append(contents->data(), contents->size()); >- } else >- builder.append(profileOrProfilePath); >- return builder.toString().ascii(); >-} >- >-static String sandboxDataVaultParentDirectory() >-{ >- char temp[PATH_MAX]; >- size_t length = confstr(_CS_DARWIN_USER_CACHE_DIR, temp, sizeof(temp)); >- if (!length) { >- WTFLogAlways("%s: Could not retrieve user cache directory path: %s\n", getprogname(), strerror(errno)); >- exit(EX_NOPERM); >- } >- RELEASE_ASSERT(length <= sizeof(temp)); >- char resolvedPath[PATH_MAX]; >- if (!realpath(temp, resolvedPath)) { >- WTFLogAlways("%s: Could not canonicalize user cache directory path: %s\n", getprogname(), strerror(errno)); >- exit(EX_NOPERM); >- } >- return resolvedPath; >-} >- >-static String sandboxDirectory(ChildProcess::ProcessType processType, const String& parentDirectory) >-{ >- StringBuilder directory; >- directory.append(parentDirectory); >- switch (processType) { >- case ChildProcess::ProcessType::WebContent: >- directory.append("/com.apple.WebKit.WebContent.Sandbox"); >- break; >- case ChildProcess::ProcessType::Network: >- directory.append("/com.apple.WebKit.Networking.Sandbox"); >- break; >- case ChildProcess::ProcessType::Plugin: >- directory.append("/com.apple.WebKit.Plugin.Sandbox"); >- break; >- } >- >-#if !USE(APPLE_INTERNAL_SDK) >- // Add .OpenSource suffix so that open source builds don't try to access a data vault used by system Safari. >- directory.append(".OpenSource"); >-#endif >- >- return directory.toString(); >-} >- >-static String sandboxFilePath(const String& directoryPath, const CString& header) >-{ >- StringBuilder sandboxFile; >- sandboxFile.append(directoryPath); >- sandboxFile.append("/CompiledSandbox+"); >- >- // Make the filename semi-unique based on the contents of the header. >- auto crypto = PAL::CryptoDigest::create(PAL::CryptoDigest::Algorithm::SHA_256); >- crypto->addBytes(header.data(), header.length()); >- Vector<uint8_t> hash = crypto->computeHash(); >- String readableHash = WTF::base64URLEncode(hash.data(), hash.size()); >- >- sandboxFile.append(readableHash); >- return sandboxFile.toString(); >-} >- >-static bool ensureSandboxCacheDirectory(const SandboxInfo& info) >-{ >- if (!FileSystem::fileIsDirectory(info.parentDirectoryPath, FileSystem::ShouldFollowSymbolicLinks::Yes)) { >- FileSystem::makeAllDirectories(info.parentDirectoryPath); >- if (!FileSystem::fileIsDirectory(info.parentDirectoryPath, FileSystem::ShouldFollowSymbolicLinks::Yes)) { >- WTFLogAlways("%s: Could not create sandbox directory\n", getprogname()); >- return false; >- } >- } >- >-#if USE(APPLE_INTERNAL_SDK) >- const char* storageClass = processStorageClass(info.processType); >- CString directoryPath = FileSystem::fileSystemRepresentation(info.directoryPath); >- if (directoryPath.isNull()) >- return false; >- >- auto makeDataVault = [&] { >- do { >- if (!rootless_mkdir_datavault(directoryPath.data(), 0700, storageClass)) >- return true; >- } while (errno == EAGAIN); >- return false; >- }; >- >- if (makeDataVault()) >- return true; >- >- if (errno == EEXIST) { >- // The directory already exists. First we'll check if it is a data vault. If it is then >- // we are the ones who created it and we can continue. If it is not a datavault then we'll just >- // delete it and try to make a new one. >- if (!rootless_check_datavault_flag(directoryPath.data(), storageClass)) >- return true; >- >- bool isDirectory = FileSystem::fileIsDirectory(info.directoryPath, FileSystem::ShouldFollowSymbolicLinks::No); >- if (isDirectory) { >- if (!FileSystem::deleteNonEmptyDirectory(info.directoryPath)) >- return false; >- } else { >- if (!FileSystem::deleteFile(info.directoryPath)) >- return false; >- } >- >- if (!makeDataVault()) >- return false; >- } else { >- WTFLogAlways("%s: Sandbox directory couldn't be created: ", getprogname(), strerror(errno)); >- return false; >- } >-#else >- bool hasSandboxDirectory = FileSystem::fileIsDirectory(info.directoryPath, FileSystem::ShouldFollowSymbolicLinks::Yes); >- if (!hasSandboxDirectory) { >- if (FileSystem::makeAllDirectories(info.directoryPath)) { >- ASSERT(FileSystem::fileIsDirectory(info.directoryPath, FileSystem::ShouldFollowSymbolicLinks::Yes)); >- hasSandboxDirectory = true; >- } else { >- // We may have raced with someone else making it. That's ok. >- hasSandboxDirectory = FileSystem::fileIsDirectory(info.directoryPath, FileSystem::ShouldFollowSymbolicLinks::Yes); >- } >- } >- >- if (!hasSandboxDirectory) { >- // Bailing because we don't have a sandbox directory. >- return false; >- } >-#endif // USE(APPLE_INTERNAL_SDK) >- >- return true; >-} >- >-static bool writeSandboxDataToCacheFile(const SandboxInfo& info, const Vector<char>& cacheFile) >-{ >- FileHandle file { info.filePath, FileSystem::FileOpenMode::Write, FileSystem::FileLockMode::Exclusive }; >- return file.write(cacheFile.data(), cacheFile.size()) == safeCast<int>(cacheFile.size()); >-} >- >-static SandboxProfilePtr compileAndCacheSandboxProfile(const SandboxInfo& info) >-{ >- if (!ensureSandboxCacheDirectory(info)) >- return nullptr; >- >- char* error = nullptr; >- CString profileOrProfilePath = info.isProfilePath ? FileSystem::fileSystemRepresentation(info.profileOrProfilePath) : info.profileOrProfilePath.utf8(); >- if (profileOrProfilePath.isNull()) >- return nullptr; >- SandboxProfilePtr sandboxProfile { info.isProfilePath ? sandbox_compile_file(profileOrProfilePath.data(), info.sandboxParameters.get(), &error) : sandbox_compile_string(profileOrProfilePath.data(), info.sandboxParameters.get(), &error) }; >- if (!sandboxProfile) { >- WTFLogAlways("%s: Could not compile WebContent sandbox: %s\n", getprogname(), error); >- return nullptr; >- } >- >- const bool haveBuiltin = sandboxProfile->builtin; >- int32_t libsandboxVersion = NSVersionOfRunTimeLibrary("sandbox"); >- RELEASE_ASSERT(libsandboxVersion > 0); >- CachedSandboxHeader cachedHeader { >- CachedSandboxVersionNumber, >- static_cast<uint32_t>(libsandboxVersion), >- safeCast<uint32_t>(info.header.length()), >- haveBuiltin ? safeCast<uint32_t>(strlen(sandboxProfile->builtin)) : std::numeric_limits<uint32_t>::max(), >- safeCast<uint32_t>(sandboxProfile->size) >- }; >- const size_t expectedFileSize = sizeof(cachedHeader) + cachedHeader.headerSize + (haveBuiltin ? cachedHeader.builtinSize : 0) + cachedHeader.dataSize; >- >- Vector<char> cacheFile; >- cacheFile.reserveInitialCapacity(expectedFileSize); >- cacheFile.append(bitwise_cast<uint8_t*>(&cachedHeader), sizeof(CachedSandboxHeader)); >- cacheFile.append(info.header.data(), info.header.length()); >- if (haveBuiltin) >- cacheFile.append(sandboxProfile->builtin, cachedHeader.builtinSize); >- cacheFile.append(sandboxProfile->data, cachedHeader.dataSize); >- >- if (!writeSandboxDataToCacheFile(info, cacheFile)) >- WTFLogAlways("%s: Unable to cache compiled sandbox\n", getprogname()); >- >- return sandboxProfile; >-} >- >-static bool tryApplyCachedSandbox(const SandboxInfo& info) >-{ >-#if USE(APPLE_INTERNAL_SDK) >- CString directoryPath = FileSystem::fileSystemRepresentation(info.directoryPath); >- if (directoryPath.isNull()) >- return false; >- if (rootless_check_datavault_flag(directoryPath.data(), processStorageClass(info.processType))) >- return false; >-#endif >- >- auto contents = fileContents(info.filePath, true, FileSystem::FileLockMode::Shared); >- if (!contents || contents->isEmpty()) >- return false; >- Vector<char> cachedSandboxContents = WTFMove(*contents); >- if (sizeof(CachedSandboxHeader) > cachedSandboxContents.size()) >- return false; >- >- // This data may be corrupted if the sandbox file was cached on a different platform with different endianness >- CachedSandboxHeader cachedSandboxHeader; >- memcpy(&cachedSandboxHeader, cachedSandboxContents.data(), sizeof(CachedSandboxHeader)); >- int32_t libsandboxVersion = NSVersionOfRunTimeLibrary("sandbox"); >- RELEASE_ASSERT(libsandboxVersion > 0); >- if (static_cast<uint32_t>(libsandboxVersion) != cachedSandboxHeader.libsandboxVersion) >- return false; >- if (cachedSandboxHeader.versionNumber != CachedSandboxVersionNumber) >- return false; >- const bool haveBuiltin = cachedSandboxHeader.builtinSize != std::numeric_limits<uint32_t>::max(); >- >- // These values are computed based on the disk layout specified below the definition of the CachedSandboxHeader struct >- // and must be changed if the layout changes. >- const char* sandboxHeaderPtr = bitwise_cast<char *>(cachedSandboxContents.data()) + sizeof(CachedSandboxHeader); >- const char* sandboxBuiltinPtr = sandboxHeaderPtr + cachedSandboxHeader.headerSize; >- unsigned char* sandboxDataPtr = bitwise_cast<unsigned char*>(haveBuiltin ? sandboxBuiltinPtr + cachedSandboxHeader.builtinSize : sandboxBuiltinPtr); >- >- size_t expectedFileSize = sizeof(CachedSandboxHeader) + cachedSandboxHeader.headerSize + cachedSandboxHeader.dataSize; >- if (haveBuiltin) >- expectedFileSize += cachedSandboxHeader.builtinSize; >- if (cachedSandboxContents.size() != expectedFileSize) >- return false; >- if (cachedSandboxHeader.headerSize != info.header.length()) >- return false; >- if (memcmp(sandboxHeaderPtr, info.header.data(), info.header.length())) >- return false; >- >- SandboxProfile profile { }; >- CString builtin; >- profile.builtin = nullptr; >- profile.size = cachedSandboxHeader.dataSize; >- if (haveBuiltin) { >- builtin = CString::newUninitialized(cachedSandboxHeader.builtinSize, profile.builtin); >- if (builtin.isNull()) >- return false; >- memcpy(profile.builtin, sandboxBuiltinPtr, cachedSandboxHeader.builtinSize); >- } >- ASSERT(static_cast<void *>(sandboxDataPtr + profile.size) <= static_cast<void *>(cachedSandboxContents.data() + cachedSandboxContents.size())); >- profile.data = sandboxDataPtr; >- >- if (sandbox_apply(&profile)) { >- WTFLogAlways("%s: Could not apply cached sandbox: %s\n", getprogname(), strerror(errno)); >- return false; >- } >- >- return true; >-} >-#endif // USE(CACHE_COMPILED_SANDBOX) >- >-static inline const NSBundle *webKit2Bundle() >-{ >-#if WK_API_ENABLED >- const static NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(@"WKWebView")]; >-#else >- const static NSBundle *bundle = [NSBundle bundleForClass:NSClassFromString(@"WKView")]; >-#endif >- >- return bundle; >-} >- >-static void getSandboxProfileOrProfilePath(const SandboxInitializationParameters& parameters, String& profileOrProfilePath, bool& isProfilePath) >-{ >- switch (parameters.mode()) { >- case SandboxInitializationParameters::ProfileSelectionMode::UseDefaultSandboxProfilePath: >- profileOrProfilePath = [webKit2Bundle() pathForResource:[[NSBundle mainBundle] bundleIdentifier] ofType:@"sb"]; >- isProfilePath = true; >- return; >- case SandboxInitializationParameters::ProfileSelectionMode::UseOverrideSandboxProfilePath: >- profileOrProfilePath = parameters.overrideSandboxProfilePath(); >- isProfilePath = true; >- return; >- case SandboxInitializationParameters::ProfileSelectionMode::UseSandboxProfile: >- profileOrProfilePath = parameters.sandboxProfile(); >- isProfilePath = false; >- return; >- } >-} >- >-static bool compileAndApplySandboxSlowCase(const String& profileOrProfilePath, bool isProfilePath, const SandboxInitializationParameters& parameters) >-{ >- char* errorBuf; >- CString temp = isProfilePath ? FileSystem::fileSystemRepresentation(profileOrProfilePath) : profileOrProfilePath.utf8(); >- uint64_t flags = isProfilePath ? SANDBOX_NAMED_EXTERNAL : 0; >- ALLOW_DEPRECATED_DECLARATIONS_BEGIN >- if (sandbox_init_with_parameters(temp.data(), flags, parameters.namedParameterArray(), &errorBuf)) { >- ALLOW_DEPRECATED_DECLARATIONS_END >- WTFLogAlways("%s: Could not initialize sandbox profile [%s], error '%s'\n", getprogname(), temp.data(), errorBuf); >- for (size_t i = 0, count = parameters.count(); i != count; ++i) >- WTFLogAlways("%s=%s\n", parameters.name(i), parameters.value(i)); >- return false; >- } >- return true; >-} >- >-static bool applySandbox(const ChildProcessInitializationParameters& parameters, const SandboxInitializationParameters& sandboxInitializationParameters, const String& dataVaultParentDirectory) >-{ >- String profileOrProfilePath; >- bool isProfilePath; >- getSandboxProfileOrProfilePath(sandboxInitializationParameters, profileOrProfilePath, isProfilePath); >- if (profileOrProfilePath.isEmpty()) { >- WTFLogAlways("%s: Profile path is invalid\n", getprogname()); >- CRASH(); >- } >- >-#if USE(CACHE_COMPILED_SANDBOX) >- // The plugin process's DARWIN_USER_TEMP_DIR and DARWIN_USER_CACHE_DIR sandbox parameters are randomized so >- // so the compiled sandbox should not be cached because it won't be reused. >- if (parameters.processType == ChildProcess::ProcessType::Plugin) >- return compileAndApplySandboxSlowCase(profileOrProfilePath, isProfilePath, sandboxInitializationParameters); >- >- SandboxParametersPtr sandboxParameters { sandbox_create_params() }; >- if (!sandboxParameters) { >- WTFLogAlways("%s: Could not create sandbox parameters\n", getprogname()); >- CRASH(); >- } >- auto header = setAndSerializeSandboxParameters(sandboxInitializationParameters, sandboxParameters, profileOrProfilePath, isProfilePath); >- if (!header) { >- WTFLogAlways("%s: Sandbox parameters are invalid\n", getprogname()); >- CRASH(); >- } >- >- String directoryPath { sandboxDirectory(parameters.processType, dataVaultParentDirectory) }; >- String filePath = sandboxFilePath(directoryPath, *header); >- SandboxInfo info { >- dataVaultParentDirectory, >- directoryPath, >- filePath, >- sandboxParameters, >- *header, >- parameters.processType, >- sandboxInitializationParameters, >- profileOrProfilePath, >- isProfilePath >- }; >- >- if (tryApplyCachedSandbox(info)) >- return true; >- >- SandboxProfilePtr sandboxProfile = compileAndCacheSandboxProfile(info); >- if (!sandboxProfile) >- return compileAndApplySandboxSlowCase(profileOrProfilePath, isProfilePath, sandboxInitializationParameters); >- >- if (sandbox_apply(sandboxProfile.get())) { >- WTFLogAlways("%s: Could not apply compiled sandbox: %s\n", getprogname(), strerror(errno)); >- CRASH(); >- } >- >- return true; >-#else >- UNUSED_PARAM(parameters); >- UNUSED_PARAM(dataVaultParentDirectory); >- return compileAndApplySandboxSlowCase(profileOrProfilePath, isProfilePath, sandboxInitializationParameters); >-#endif // USE(CACHE_COMPILED_SANDBOX) >-} >- >-static void initializeSandboxParameters(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >-{ >- // Verify user directory suffix. >- if (sandboxParameters.userDirectorySuffix().isNull()) { >- auto userDirectorySuffix = parameters.extraInitializationData.find("user-directory-suffix"); >- if (userDirectorySuffix != parameters.extraInitializationData.end()) >- sandboxParameters.setUserDirectorySuffix([makeString(userDirectorySuffix->value, '/', String([[NSBundle mainBundle] bundleIdentifier])) fileSystemRepresentation]); >- else { >- String clientIdentifier = codeSigningIdentifier(parameters.connectionIdentifier.xpcConnection.get()); >- if (clientIdentifier.isNull()) >- clientIdentifier = parameters.clientIdentifier; >- String defaultUserDirectorySuffix = makeString(String([[NSBundle mainBundle] bundleIdentifier]), '+', clientIdentifier); >- sandboxParameters.setUserDirectorySuffix(defaultUserDirectorySuffix); >- } >- } >- >- String osSystemMarketingVersion = systemMarketingVersion(); >- Vector<String> osVersionParts = osSystemMarketingVersion.split('.'); >- if (osVersionParts.size() < 2) { >- WTFLogAlways("%s: Couldn't find OS Version\n", getprogname()); >- exit(EX_NOPERM); >- } >- String osVersion = osVersionParts[0] + '.' + osVersionParts[1]; >- sandboxParameters.addParameter("_OS_VERSION", osVersion.utf8().data()); >- >- // Use private temporary and cache directories. >- setenv("DIRHELPER_USER_DIR_SUFFIX", FileSystem::fileSystemRepresentation(sandboxParameters.userDirectorySuffix()).data(), 1); >- char temporaryDirectory[PATH_MAX]; >- if (!confstr(_CS_DARWIN_USER_TEMP_DIR, temporaryDirectory, sizeof(temporaryDirectory))) { >- WTFLogAlways("%s: couldn't retrieve private temporary directory path: %d\n", getprogname(), errno); >- exit(EX_NOPERM); >- } >- setenv("TMPDIR", temporaryDirectory, 1); >- >- sandboxParameters.addPathParameter("WEBKIT2_FRAMEWORK_DIR", [[webKit2Bundle() bundlePath] stringByDeletingLastPathComponent]); >- sandboxParameters.addConfDirectoryParameter("DARWIN_USER_TEMP_DIR", _CS_DARWIN_USER_TEMP_DIR); >- sandboxParameters.addConfDirectoryParameter("DARWIN_USER_CACHE_DIR", _CS_DARWIN_USER_CACHE_DIR); >- >- char buffer[4096]; >- int bufferSize = sizeof(buffer); >- struct passwd pwd; >- struct passwd* result = 0; >- if (getpwuid_r(getuid(), &pwd, buffer, bufferSize, &result) || !result) { >- WTFLogAlways("%s: Couldn't find home directory\n", getprogname()); >- exit(EX_NOPERM); >- } >- >- sandboxParameters.addPathParameter("HOME_DIR", pwd.pw_dir); >- String path = String::fromUTF8(pwd.pw_dir); >- path.append("/Library"); >- sandboxParameters.addPathParameter("HOME_LIBRARY_DIR", FileSystem::fileSystemRepresentation(path).data()); >- path.append("/Preferences"); >- sandboxParameters.addPathParameter("HOME_LIBRARY_PREFERENCES_DIR", FileSystem::fileSystemRepresentation(path).data()); >-} >- >-void ChildProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >-{ >- TraceScope traceScope(InitializeSandboxStart, InitializeSandboxEnd); >- >-#if USE(CACHE_COMPILED_SANDBOX) >- // This must be called before initializeSandboxParameters so that the path does not include the user directory suffix. >- // We don't want the user directory suffix because we want all processes of the same type to use the same cache directory. >- String dataVaultParentDirectory { sandboxDataVaultParentDirectory() }; >-#else >- String dataVaultParentDirectory; >-#endif >- >- initializeSandboxParameters(parameters, sandboxParameters); >- >- if (!applySandbox(parameters, sandboxParameters, dataVaultParentDirectory)) { >- WTFLogAlways("%s: Unable to apply sandbox\n", getprogname()); >- CRASH(); >- } >- >- if (shouldOverrideQuarantine()) { >- // This will override LSFileQuarantineEnabled from Info.plist unless sandbox quarantine is globally disabled. >- OSStatus error = enableSandboxStyleFileQuarantine(); >- if (error) { >- WTFLogAlways("%s: Couldn't enable sandbox style file quarantine: %ld\n", getprogname(), static_cast<long>(error)); >- exit(EX_NOPERM); >- } >- } >-} >- >-#if USE(APPKIT) >-void ChildProcess::stopNSAppRunLoop() >-{ >- ASSERT([NSApp isRunning]); >- [NSApp stop:nil]; >- >- NSEvent *event = [NSEvent otherEventWithType:NSEventTypeApplicationDefined location:NSMakePoint(0, 0) modifierFlags:0 timestamp:0.0 windowNumber:0 context:nil subtype:0 data1:0 data2:0]; >- [NSApp postEvent:event atStart:true]; >-} >-#endif >- >-#if !PLATFORM(IOSMAC) && ENABLE(WEBPROCESS_NSRUNLOOP) >-void ChildProcess::stopNSRunLoop() >-{ >- ASSERT([NSRunLoop mainRunLoop]); >- [[NSRunLoop mainRunLoop] performBlock:^{ >- exit(0); >- }]; >-} >-#endif >- >-#if PLATFORM(IOSMAC) >-void ChildProcess::platformStopRunLoop() >-{ >- XPCServiceExit(WTFMove(m_priorityBoostMessage)); >-} >-#endif >- >-void ChildProcess::setQOS(int latencyQOS, int throughputQOS) >-{ >- if (!latencyQOS && !throughputQOS) >- return; >- >- struct task_qos_policy qosinfo = { >- latencyQOS ? LATENCY_QOS_TIER_0 + latencyQOS - 1 : LATENCY_QOS_TIER_UNSPECIFIED, >- throughputQOS ? THROUGHPUT_QOS_TIER_0 + throughputQOS - 1 : THROUGHPUT_QOS_TIER_UNSPECIFIED >- }; >- >- task_policy_set(mach_task_self(), TASK_OVERRIDE_QOS_POLICY, (task_policy_t)&qosinfo, TASK_QOS_POLICY_COUNT); >-} >- >-#if PLATFORM(MAC) >-bool ChildProcess::isSystemWebKit() >-{ >- static bool isSystemWebKit = [] { >- return [[webKit2Bundle() bundlePath] hasPrefix:@"/System/"]; >- }(); >- return isSystemWebKit; >-} >-#endif >- >-} // namespace WebKit >- >-#endif >Index: Source/WebKit/Shared/mac/SecItemShim.cpp >=================================================================== >--- Source/WebKit/Shared/mac/SecItemShim.cpp (revision 240589) >+++ Source/WebKit/Shared/mac/SecItemShim.cpp (working copy) >@@ -29,7 +29,7 @@ > #if ENABLE(SEC_ITEM_SHIM) > > #include "BlockingResponseMap.h" >-#include "ChildProcess.h" >+#include "NetworkProcess.h" > #include "SecItemRequestData.h" > #include "SecItemResponseData.h" > #include "SecItemShimLibrary.h" >@@ -58,7 +58,11 @@ extern "C" void _CFURLConnectionSetFrame > > namespace WebKit { > >-static ChildProcess* sharedProcess; >+static WeakPtr<NetworkProcess>& globalNetworkProcess() >+{ >+ static NeverDestroyed<WeakPtr<NetworkProcess>> networkProcess; >+ return networkProcess.get(); >+} > > static WorkQueue& workQueue() > { >@@ -74,11 +78,14 @@ static WorkQueue& workQueue() > > static Optional<SecItemResponseData> sendSecItemRequest(SecItemRequestData::Type requestType, CFDictionaryRef query, CFDictionaryRef attributesToMatch = 0) > { >+ if (!globalNetworkProcess()) >+ return WTF::nullopt; >+ > Optional<SecItemResponseData> response; > > BinarySemaphore semaphore; > >- sharedProcess->parentProcessConnection()->sendWithReply(Messages::SecItemShimProxy::SecItemRequest(SecItemRequestData(requestType, query, attributesToMatch)), 0, workQueue(), [&response, &semaphore](auto reply) { >+ globalNetworkProcess()->parentProcessConnection()->sendWithReply(Messages::SecItemShimProxy::SecItemRequest(SecItemRequestData(requestType, query, attributesToMatch)), 0, workQueue(), [&response, &semaphore](auto reply) { > if (reply) > response = WTFMove(std::get<0>(*reply)); > >@@ -134,9 +141,9 @@ static OSStatus webSecItemDelete(CFDicti > return response->resultCode(); > } > >-void initializeSecItemShim(ChildProcess& process) >+void initializeSecItemShim(NetworkProcess& process) > { >- sharedProcess = &process; >+ globalNetworkProcess() = makeWeakPtr(process); > > #if PLATFORM(IOS_FAMILY) > struct _CFNFrameworksStubs stubs = { >Index: Source/WebKit/Shared/mac/SecItemShim.h >=================================================================== >--- Source/WebKit/Shared/mac/SecItemShim.h (revision 240589) >+++ Source/WebKit/Shared/mac/SecItemShim.h (working copy) >@@ -27,9 +27,9 @@ > > namespace WebKit { > >-class ChildProcess; >+class NetworkProcess; > >-void initializeSecItemShim(ChildProcess&); >+void initializeSecItemShim(NetworkProcess&); > > } // namespace WebKit > >Index: Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp >=================================================================== >--- Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp (revision 240589) (from Source/WebKit/Shared/unix/ChildProcessMain.cpp:240589) >+++ Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp (working copy) >@@ -0,0 +1,45 @@ >+/* >+ * Copyright (C) 2014 Igalia S.L. >+ * >+ * 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. >+ */ >+ >+#include "config.h" >+#include "ChildProcessMain.h" >+ >+#include <WebCore/Process.h> >+#include <stdlib.h> >+ >+namespace WebKit { >+ >+bool ChildProcessMainBase::parseCommandLine(int argc, char** argv) >+{ >+ ASSERT(argc >= 3); >+ if (argc < 3) >+ return false; >+ >+ m_parameters.processIdentifier = makeObjectIdentifier<WebCore::ProcessIdentifierType>(atoll(argv[1])); >+ m_parameters.connectionIdentifier = atoi(argv[2]); >+ return true; >+} >+ >+} // namespace WebKit > >Property changes on: Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Index: Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp >=================================================================== >--- Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp (revision 240589) >+++ Source/WebKit/Shared/unix/AuxiliaryProcessMain.cpp (working copy) >@@ -24,14 +24,14 @@ > */ > > #include "config.h" >-#include "ChildProcessMain.h" >+#include "AuxiliaryProcessMain.h" > > #include <WebCore/Process.h> > #include <stdlib.h> > > namespace WebKit { > >-bool ChildProcessMainBase::parseCommandLine(int argc, char** argv) >+bool AuxiliaryProcessMainBase::parseCommandLine(int argc, char** argv) > { > ASSERT(argc >= 3); > if (argc < 3) >Index: Source/WebKit/Shared/unix/AuxiliaryProcessMain.h >=================================================================== >--- Source/WebKit/Shared/unix/AuxiliaryProcessMain.h (revision 240589) (from Source/WebKit/Shared/unix/ChildProcessMain.h:240589) >+++ Source/WebKit/Shared/unix/AuxiliaryProcessMain.h (working copy) >@@ -0,0 +1,72 @@ >+/* >+ * Copyright (C) 2014 Igalia S.L. >+ * >+ * 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 >+ >+#include "ChildProcess.h" >+#include "WebKit2Initialize.h" >+#include <wtf/RunLoop.h> >+ >+namespace WebKit { >+ >+class ChildProcessMainBase { >+public: >+ virtual bool platformInitialize() { return true; } >+ virtual bool parseCommandLine(int argc, char** argv); >+ virtual void platformFinalize() { } >+ >+ ChildProcessInitializationParameters&& takeInitializationParameters() { return WTFMove(m_parameters); } >+ >+protected: >+ ChildProcessInitializationParameters m_parameters; >+}; >+ >+template<typename ChildProcessType> >+void initializeChildProcess(ChildProcessInitializationParameters&& parameters) >+{ >+ ChildProcessType::singleton().initialize(WTFMove(parameters)); >+} >+ >+template<typename ChildProcessType, typename ChildProcessMainType> >+int ChildProcessMain(int argc, char** argv) >+{ >+ ChildProcessMainType childMain; >+ >+ if (!childMain.platformInitialize()) >+ return EXIT_FAILURE; >+ >+ InitializeWebKit2(); >+ >+ if (!childMain.parseCommandLine(argc, argv)) >+ return EXIT_FAILURE; >+ >+ initializeChildProcess<ChildProcessType>(childMain.takeInitializationParameters()); >+ RunLoop::run(); >+ childMain.platformFinalize(); >+ >+ return EXIT_SUCCESS; >+} >+ >+} // namespace WebKit > >Property changes on: Source/WebKit/Shared/unix/AuxiliaryProcessMain.h >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Index: Source/WebKit/Shared/unix/AuxiliaryProcessMain.h >=================================================================== >--- Source/WebKit/Shared/unix/AuxiliaryProcessMain.h (revision 240589) >+++ Source/WebKit/Shared/unix/AuxiliaryProcessMain.h (working copy) >@@ -25,46 +25,46 @@ > > #pragma once > >-#include "ChildProcess.h" >+#include "AuxiliaryProcess.h" > #include "WebKit2Initialize.h" > #include <wtf/RunLoop.h> > > namespace WebKit { > >-class ChildProcessMainBase { >+class AuxiliaryProcessMainBase { > public: > virtual bool platformInitialize() { return true; } > virtual bool parseCommandLine(int argc, char** argv); > virtual void platformFinalize() { } > >- ChildProcessInitializationParameters&& takeInitializationParameters() { return WTFMove(m_parameters); } >+ AuxiliaryProcessInitializationParameters&& takeInitializationParameters() { return WTFMove(m_parameters); } > > protected: >- ChildProcessInitializationParameters m_parameters; >+ AuxiliaryProcessInitializationParameters m_parameters; > }; > >-template<typename ChildProcessType> >-void initializeChildProcess(ChildProcessInitializationParameters&& parameters) >+template<typename AuxiliaryProcessType> >+void initializeAuxiliaryProcess(AuxiliaryProcessInitializationParameters&& parameters) > { >- ChildProcessType::singleton().initialize(WTFMove(parameters)); >+ AuxiliaryProcessType::singleton().initialize(WTFMove(parameters)); > } > >-template<typename ChildProcessType, typename ChildProcessMainType> >-int ChildProcessMain(int argc, char** argv) >+template<typename AuxiliaryProcessType, typename AuxiliaryProcessMainType> >+int AuxiliaryProcessMain(int argc, char** argv) > { >- ChildProcessMainType childMain; >+ AuxiliaryProcessMainType auxiliaryMain; > >- if (!childMain.platformInitialize()) >+ if (!auxiliaryMain.platformInitialize()) > return EXIT_FAILURE; > > InitializeWebKit2(); > >- if (!childMain.parseCommandLine(argc, argv)) >+ if (!auxiliaryMain.parseCommandLine(argc, argv)) > return EXIT_FAILURE; > >- initializeChildProcess<ChildProcessType>(childMain.takeInitializationParameters()); >+ initializeAuxiliaryProcess<AuxiliaryProcessType>(auxiliaryMain.takeInitializationParameters()); > RunLoop::run(); >- childMain.platformFinalize(); >+ auxiliaryMain.platformFinalize(); > > return EXIT_SUCCESS; > } >Index: Source/WebKit/Shared/unix/ChildProcessMain.cpp >=================================================================== >--- Source/WebKit/Shared/unix/ChildProcessMain.cpp (revision 240589) >+++ Source/WebKit/Shared/unix/ChildProcessMain.cpp (nonexistent) >@@ -1,45 +0,0 @@ >-/* >- * Copyright (C) 2014 Igalia S.L. >- * >- * 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. >- */ >- >-#include "config.h" >-#include "ChildProcessMain.h" >- >-#include <WebCore/Process.h> >-#include <stdlib.h> >- >-namespace WebKit { >- >-bool ChildProcessMainBase::parseCommandLine(int argc, char** argv) >-{ >- ASSERT(argc >= 3); >- if (argc < 3) >- return false; >- >- m_parameters.processIdentifier = makeObjectIdentifier<WebCore::ProcessIdentifierType>(atoll(argv[1])); >- m_parameters.connectionIdentifier = atoi(argv[2]); >- return true; >-} >- >-} // namespace WebKit > >Property changes on: Source/WebKit/Shared/unix/ChildProcessMain.cpp >___________________________________________________________________ >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Index: Source/WebKit/Shared/unix/ChildProcessMain.h >=================================================================== >--- Source/WebKit/Shared/unix/ChildProcessMain.h (revision 240589) >+++ Source/WebKit/Shared/unix/ChildProcessMain.h (nonexistent) >@@ -1,72 +0,0 @@ >-/* >- * Copyright (C) 2014 Igalia S.L. >- * >- * 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 >- >-#include "ChildProcess.h" >-#include "WebKit2Initialize.h" >-#include <wtf/RunLoop.h> >- >-namespace WebKit { >- >-class ChildProcessMainBase { >-public: >- virtual bool platformInitialize() { return true; } >- virtual bool parseCommandLine(int argc, char** argv); >- virtual void platformFinalize() { } >- >- ChildProcessInitializationParameters&& takeInitializationParameters() { return WTFMove(m_parameters); } >- >-protected: >- ChildProcessInitializationParameters m_parameters; >-}; >- >-template<typename ChildProcessType> >-void initializeChildProcess(ChildProcessInitializationParameters&& parameters) >-{ >- ChildProcessType::singleton().initialize(WTFMove(parameters)); >-} >- >-template<typename ChildProcessType, typename ChildProcessMainType> >-int ChildProcessMain(int argc, char** argv) >-{ >- ChildProcessMainType childMain; >- >- if (!childMain.platformInitialize()) >- return EXIT_FAILURE; >- >- InitializeWebKit2(); >- >- if (!childMain.parseCommandLine(argc, argv)) >- return EXIT_FAILURE; >- >- initializeChildProcess<ChildProcessType>(childMain.takeInitializationParameters()); >- RunLoop::run(); >- childMain.platformFinalize(); >- >- return EXIT_SUCCESS; >-} >- >-} // namespace WebKit > >Property changes on: Source/WebKit/Shared/unix/ChildProcessMain.h >___________________________________________________________________ >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Index: Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp >=================================================================== >--- Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp (revision 240589) (from Source/WebKit/Shared/win/ChildProcessMainWin.cpp:240589) >+++ Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp (working copy) >@@ -0,0 +1,48 @@ >+/* >+ * Copyright (C) 2018 Sony Interactive Entertainment Inc. >+ * >+ * 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. >+ */ >+ >+#include "config.h" >+#include "ChildProcessMain.h" >+ >+#include <cstring> >+#include <wtf/text/WTFString.h> >+ >+namespace WebKit { >+ >+bool ChildProcessMainBase::parseCommandLine(int argc, char** argv) >+{ >+ for (int i = 0; i < argc; i++) { >+ if (!strcmp(argv[i], "-clientIdentifier") && i + 1 < argc) { >+ String str(argv[++i]); >+ m_parameters.connectionIdentifier = reinterpret_cast<HANDLE>(str.toUInt64()); >+ } else if (!strcmp(argv[i], "-processIdentifier") && i + 1 < argc) { >+ String str(argv[++i]); >+ m_parameters.processIdentifier = makeObjectIdentifier<WebCore::ProcessIdentifierType>(str.toUInt64()); >+ } >+ } >+ return true; >+} >+ >+} // namespace WebKit >Index: Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp >=================================================================== >--- Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp (revision 240589) >+++ Source/WebKit/Shared/win/AuxiliaryProcessMainWin.cpp (working copy) >@@ -24,14 +24,14 @@ > */ > > #include "config.h" >-#include "ChildProcessMain.h" >+#include "AuxiliaryProcessMain.h" > > #include <cstring> > #include <wtf/text/WTFString.h> > > namespace WebKit { > >-bool ChildProcessMainBase::parseCommandLine(int argc, char** argv) >+bool AuxiliaryProcessMainBase::parseCommandLine(int argc, char** argv) > { > for (int i = 0; i < argc; i++) { > if (!strcmp(argv[i], "-clientIdentifier") && i + 1 < argc) { >Index: Source/WebKit/Shared/win/ChildProcessMainWin.cpp >=================================================================== >--- Source/WebKit/Shared/win/ChildProcessMainWin.cpp (revision 240589) >+++ Source/WebKit/Shared/win/ChildProcessMainWin.cpp (nonexistent) >@@ -1,48 +0,0 @@ >-/* >- * Copyright (C) 2018 Sony Interactive Entertainment Inc. >- * >- * 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. >- */ >- >-#include "config.h" >-#include "ChildProcessMain.h" >- >-#include <cstring> >-#include <wtf/text/WTFString.h> >- >-namespace WebKit { >- >-bool ChildProcessMainBase::parseCommandLine(int argc, char** argv) >-{ >- for (int i = 0; i < argc; i++) { >- if (!strcmp(argv[i], "-clientIdentifier") && i + 1 < argc) { >- String str(argv[++i]); >- m_parameters.connectionIdentifier = reinterpret_cast<HANDLE>(str.toUInt64()); >- } else if (!strcmp(argv[i], "-processIdentifier") && i + 1 < argc) { >- String str(argv[++i]); >- m_parameters.processIdentifier = makeObjectIdentifier<WebCore::ProcessIdentifierType>(str.toUInt64()); >- } >- } >- return true; >-} >- >-} // namespace WebKit >Index: Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp (revision 240589) (from Source/WebKit/UIProcess/ChildProcessProxy.cpp:240589) >+++ Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp (working copy) >@@ -0,0 +1,231 @@ >+/* >+ * Copyright (C) 2012-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. >+ */ >+ >+#include "config.h" >+#include "ChildProcessProxy.h" >+ >+#include "ChildProcessMessages.h" >+#include <wtf/RunLoop.h> >+ >+namespace WebKit { >+ >+ChildProcessProxy::ChildProcessProxy(bool alwaysRunsAtBackgroundPriority) >+ : m_alwaysRunsAtBackgroundPriority(alwaysRunsAtBackgroundPriority) >+{ >+} >+ >+ChildProcessProxy::~ChildProcessProxy() >+{ >+ if (m_connection) >+ m_connection->invalidate(); >+ >+ if (m_processLauncher) { >+ m_processLauncher->invalidate(); >+ m_processLauncher = nullptr; >+ } >+} >+ >+void ChildProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) >+{ >+ launchOptions.processIdentifier = m_processIdentifier; >+ >+ if (const char* userDirectorySuffix = getenv("DIRHELPER_USER_DIR_SUFFIX")) >+ launchOptions.extraInitializationData.add("user-directory-suffix"_s, userDirectorySuffix); >+ >+ if (m_alwaysRunsAtBackgroundPriority) >+ launchOptions.extraInitializationData.add("always-runs-at-background-priority"_s, "true"); >+ >+#if ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE)) >+ const char* varname; >+ switch (launchOptions.processType) { >+ case ProcessLauncher::ProcessType::Web: >+ varname = "WEB_PROCESS_CMD_PREFIX"; >+ break; >+#if ENABLE(NETSCAPE_PLUGIN_API) >+ case ProcessLauncher::ProcessType::Plugin64: >+ case ProcessLauncher::ProcessType::Plugin32: >+ varname = "PLUGIN_PROCESS_CMD_PREFIX"; >+ break; >+#endif >+ case ProcessLauncher::ProcessType::Network: >+ varname = "NETWORK_PROCESS_CMD_PREFIX"; >+ break; >+ } >+ const char* processCmdPrefix = getenv(varname); >+ if (processCmdPrefix && *processCmdPrefix) >+ launchOptions.processCmdPrefix = String::fromUTF8(processCmdPrefix); >+#endif // ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE)) >+ >+ platformGetLaunchOptions(launchOptions); >+} >+ >+void ChildProcessProxy::connect() >+{ >+ ASSERT(!m_processLauncher); >+ ProcessLauncher::LaunchOptions launchOptions; >+ getLaunchOptions(launchOptions); >+ m_processLauncher = ProcessLauncher::create(this, launchOptions); >+} >+ >+void ChildProcessProxy::terminate() >+{ >+#if PLATFORM(COCOA) >+ if (m_connection && m_connection->kill()) >+ return; >+#endif >+ >+ // FIXME: We should really merge process launching into IPC connection creation and get rid of the process launcher. >+ if (m_processLauncher) >+ m_processLauncher->terminateProcess(); >+} >+ >+ChildProcessProxy::State ChildProcessProxy::state() const >+{ >+ if (m_processLauncher && m_processLauncher->isLaunching()) >+ return ChildProcessProxy::State::Launching; >+ >+ if (!m_connection) >+ return ChildProcessProxy::State::Terminated; >+ >+ return ChildProcessProxy::State::Running; >+} >+ >+bool ChildProcessProxy::sendMessage(std::unique_ptr<IPC::Encoder> encoder, OptionSet<IPC::SendOption> sendOptions) >+{ >+ switch (state()) { >+ case State::Launching: >+ // If we're waiting for the child process to launch, we need to stash away the messages so we can send them once we have a connection. >+ m_pendingMessages.append(std::make_pair(WTFMove(encoder), sendOptions)); >+ return true; >+ >+ case State::Running: >+ return connection()->sendMessage(WTFMove(encoder), sendOptions); >+ >+ case State::Terminated: >+ return false; >+ } >+ >+ return false; >+} >+ >+void ChildProcessProxy::addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver& messageReceiver) >+{ >+ m_messageReceiverMap.addMessageReceiver(messageReceiverName, messageReceiver); >+} >+ >+void ChildProcessProxy::addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver& messageReceiver) >+{ >+ m_messageReceiverMap.addMessageReceiver(messageReceiverName, destinationID, messageReceiver); >+} >+ >+void ChildProcessProxy::removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID) >+{ >+ m_messageReceiverMap.removeMessageReceiver(messageReceiverName, destinationID); >+} >+ >+void ChildProcessProxy::removeMessageReceiver(IPC::StringReference messageReceiverName) >+{ >+ m_messageReceiverMap.removeMessageReceiver(messageReceiverName); >+} >+ >+bool ChildProcessProxy::dispatchMessage(IPC::Connection& connection, IPC::Decoder& decoder) >+{ >+ return m_messageReceiverMap.dispatchMessage(connection, decoder); >+} >+ >+bool ChildProcessProxy::dispatchSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder) >+{ >+ return m_messageReceiverMap.dispatchSyncMessage(connection, decoder, replyEncoder); >+} >+ >+void ChildProcessProxy::didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier connectionIdentifier) >+{ >+ ASSERT(!m_connection); >+ >+ if (!IPC::Connection::identifierIsValid(connectionIdentifier)) >+ return; >+ >+ m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this); >+ >+ connectionWillOpen(*m_connection); >+ m_connection->open(); >+ >+ for (size_t i = 0; i < m_pendingMessages.size(); ++i) { >+ std::unique_ptr<IPC::Encoder> message = WTFMove(m_pendingMessages[i].first); >+ OptionSet<IPC::SendOption> sendOptions = m_pendingMessages[i].second; >+ m_connection->sendMessage(WTFMove(message), sendOptions); >+ } >+ >+ m_pendingMessages.clear(); >+} >+ >+void ChildProcessProxy::shutDownProcess() >+{ >+ switch (state()) { >+ case State::Launching: >+ m_processLauncher->invalidate(); >+ m_processLauncher = nullptr; >+ break; >+ case State::Running: >+#if PLATFORM(IOS_FAMILY) >+ // On iOS deploy a watchdog in the UI process, since the child process may be suspended. >+ // If 30s is insufficient for any outstanding activity to complete cleanly, then it will be killed. >+ ASSERT(m_connection); >+ m_connection->terminateSoon(30_s); >+#endif >+ break; >+ case State::Terminated: >+ return; >+ } >+ >+ if (!m_connection) >+ return; >+ >+ processWillShutDown(*m_connection); >+ >+ if (canSendMessage()) >+ send(Messages::ChildProcess::ShutDown(), 0); >+ >+ m_connection->invalidate(); >+ m_connection = nullptr; >+} >+ >+void ChildProcessProxy::setProcessSuppressionEnabled(bool processSuppressionEnabled) >+{ >+#if PLATFORM(COCOA) >+ if (state() != State::Running) >+ return; >+ >+ connection()->send(Messages::ChildProcess::SetProcessSuppressionEnabled(processSuppressionEnabled), 0); >+#else >+ UNUSED_PARAM(processSuppressionEnabled); >+#endif >+} >+ >+void ChildProcessProxy::connectionWillOpen(IPC::Connection&) >+{ >+} >+ >+} // namespace WebKit > >Property changes on: Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Index: Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp (revision 240589) >+++ Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp (working copy) >@@ -24,19 +24,19 @@ > */ > > #include "config.h" >-#include "ChildProcessProxy.h" >+#include "AuxiliaryProcessProxy.h" > >-#include "ChildProcessMessages.h" >+#include "AuxiliaryProcessMessages.h" > #include <wtf/RunLoop.h> > > namespace WebKit { > >-ChildProcessProxy::ChildProcessProxy(bool alwaysRunsAtBackgroundPriority) >+AuxiliaryProcessProxy::AuxiliaryProcessProxy(bool alwaysRunsAtBackgroundPriority) > : m_alwaysRunsAtBackgroundPriority(alwaysRunsAtBackgroundPriority) > { > } > >-ChildProcessProxy::~ChildProcessProxy() >+AuxiliaryProcessProxy::~AuxiliaryProcessProxy() > { > if (m_connection) > m_connection->invalidate(); >@@ -47,7 +47,7 @@ ChildProcessProxy::~ChildProcessProxy() > } > } > >-void ChildProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) >+void AuxiliaryProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) > { > launchOptions.processIdentifier = m_processIdentifier; > >@@ -81,7 +81,7 @@ void ChildProcessProxy::getLaunchOptions > platformGetLaunchOptions(launchOptions); > } > >-void ChildProcessProxy::connect() >+void AuxiliaryProcessProxy::connect() > { > ASSERT(!m_processLauncher); > ProcessLauncher::LaunchOptions launchOptions; >@@ -89,7 +89,7 @@ void ChildProcessProxy::connect() > m_processLauncher = ProcessLauncher::create(this, launchOptions); > } > >-void ChildProcessProxy::terminate() >+void AuxiliaryProcessProxy::terminate() > { > #if PLATFORM(COCOA) > if (m_connection && m_connection->kill()) >@@ -101,18 +101,18 @@ void ChildProcessProxy::terminate() > m_processLauncher->terminateProcess(); > } > >-ChildProcessProxy::State ChildProcessProxy::state() const >+AuxiliaryProcessProxy::State AuxiliaryProcessProxy::state() const > { > if (m_processLauncher && m_processLauncher->isLaunching()) >- return ChildProcessProxy::State::Launching; >+ return AuxiliaryProcessProxy::State::Launching; > > if (!m_connection) >- return ChildProcessProxy::State::Terminated; >+ return AuxiliaryProcessProxy::State::Terminated; > >- return ChildProcessProxy::State::Running; >+ return AuxiliaryProcessProxy::State::Running; > } > >-bool ChildProcessProxy::sendMessage(std::unique_ptr<IPC::Encoder> encoder, OptionSet<IPC::SendOption> sendOptions) >+bool AuxiliaryProcessProxy::sendMessage(std::unique_ptr<IPC::Encoder> encoder, OptionSet<IPC::SendOption> sendOptions) > { > switch (state()) { > case State::Launching: >@@ -130,37 +130,37 @@ bool ChildProcessProxy::sendMessage(std: > return false; > } > >-void ChildProcessProxy::addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver& messageReceiver) >+void AuxiliaryProcessProxy::addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver& messageReceiver) > { > m_messageReceiverMap.addMessageReceiver(messageReceiverName, messageReceiver); > } > >-void ChildProcessProxy::addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver& messageReceiver) >+void AuxiliaryProcessProxy::addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver& messageReceiver) > { > m_messageReceiverMap.addMessageReceiver(messageReceiverName, destinationID, messageReceiver); > } > >-void ChildProcessProxy::removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID) >+void AuxiliaryProcessProxy::removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID) > { > m_messageReceiverMap.removeMessageReceiver(messageReceiverName, destinationID); > } > >-void ChildProcessProxy::removeMessageReceiver(IPC::StringReference messageReceiverName) >+void AuxiliaryProcessProxy::removeMessageReceiver(IPC::StringReference messageReceiverName) > { > m_messageReceiverMap.removeMessageReceiver(messageReceiverName); > } > >-bool ChildProcessProxy::dispatchMessage(IPC::Connection& connection, IPC::Decoder& decoder) >+bool AuxiliaryProcessProxy::dispatchMessage(IPC::Connection& connection, IPC::Decoder& decoder) > { > return m_messageReceiverMap.dispatchMessage(connection, decoder); > } > >-bool ChildProcessProxy::dispatchSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder) >+bool AuxiliaryProcessProxy::dispatchSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder) > { > return m_messageReceiverMap.dispatchSyncMessage(connection, decoder, replyEncoder); > } > >-void ChildProcessProxy::didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier connectionIdentifier) >+void AuxiliaryProcessProxy::didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier connectionIdentifier) > { > ASSERT(!m_connection); > >@@ -181,7 +181,7 @@ void ChildProcessProxy::didFinishLaunchi > m_pendingMessages.clear(); > } > >-void ChildProcessProxy::shutDownProcess() >+void AuxiliaryProcessProxy::shutDownProcess() > { > switch (state()) { > case State::Launching: >@@ -206,25 +206,25 @@ void ChildProcessProxy::shutDownProcess( > processWillShutDown(*m_connection); > > if (canSendMessage()) >- send(Messages::ChildProcess::ShutDown(), 0); >+ send(Messages::AuxiliaryProcess::ShutDown(), 0); > > m_connection->invalidate(); > m_connection = nullptr; > } > >-void ChildProcessProxy::setProcessSuppressionEnabled(bool processSuppressionEnabled) >+void AuxiliaryProcessProxy::setProcessSuppressionEnabled(bool processSuppressionEnabled) > { > #if PLATFORM(COCOA) > if (state() != State::Running) > return; > >- connection()->send(Messages::ChildProcess::SetProcessSuppressionEnabled(processSuppressionEnabled), 0); >+ connection()->send(Messages::AuxiliaryProcess::SetProcessSuppressionEnabled(processSuppressionEnabled), 0); > #else > UNUSED_PARAM(processSuppressionEnabled); > #endif > } > >-void ChildProcessProxy::connectionWillOpen(IPC::Connection&) >+void AuxiliaryProcessProxy::connectionWillOpen(IPC::Connection&) > { > } > >Index: Source/WebKit/UIProcess/AuxiliaryProcessProxy.h >=================================================================== >--- Source/WebKit/UIProcess/AuxiliaryProcessProxy.h (revision 240589) (from Source/WebKit/UIProcess/ChildProcessProxy.h:240589) >+++ Source/WebKit/UIProcess/AuxiliaryProcessProxy.h (working copy) >@@ -0,0 +1,146 @@ >+/* >+ * Copyright (C) 2012-2016 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 >+ >+#include "Connection.h" >+#include "MessageReceiverMap.h" >+#include "ProcessLauncher.h" >+ >+#include <WebCore/Process.h> >+#include <wtf/ProcessID.h> >+#include <wtf/SystemTracing.h> >+#include <wtf/ThreadSafeRefCounted.h> >+ >+namespace WebKit { >+ >+class ChildProcessProxy : ProcessLauncher::Client, public IPC::Connection::Client { >+ WTF_MAKE_NONCOPYABLE(ChildProcessProxy); >+ >+protected: >+ explicit ChildProcessProxy(bool alwaysRunsAtBackgroundPriority = false); >+ >+public: >+ virtual ~ChildProcessProxy(); >+ >+ void connect(); >+ void terminate(); >+ >+ template<typename T> bool send(T&& message, uint64_t destinationID, OptionSet<IPC::SendOption> sendOptions = { }); >+ template<typename T> bool sendSync(T&& message, typename T::Reply&&, uint64_t destinationID, Seconds timeout = 1_s, OptionSet<IPC::SendSyncOption> sendSyncOptions = { }); >+ template<typename T, typename... Args> void sendWithAsyncReply(T&&, CompletionHandler<void(Args...)>&&); >+ >+ IPC::Connection* connection() const >+ { >+ ASSERT(m_connection); >+ return m_connection.get(); >+ } >+ >+ bool hasConnection(const IPC::Connection& connection) const >+ { >+ return m_connection == &connection; >+ } >+ >+ void addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver&); >+ void addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver&); >+ void removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID); >+ void removeMessageReceiver(IPC::StringReference messageReceiverName); >+ >+ enum class State { >+ Launching, >+ Running, >+ Terminated, >+ }; >+ State state() const; >+ >+ ProcessID processIdentifier() const { return m_processLauncher ? m_processLauncher->processIdentifier() : 0; } >+ >+ bool canSendMessage() const { return state() != State::Terminated;} >+ bool sendMessage(std::unique_ptr<IPC::Encoder>, OptionSet<IPC::SendOption>); >+ >+ void shutDownProcess(); >+ >+ WebCore::ProcessIdentifier coreProcessIdentifier() const { return m_processIdentifier; } >+ >+ void setProcessSuppressionEnabled(bool); >+ >+protected: >+ // ProcessLauncher::Client >+ void didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier) override; >+ >+ bool dispatchMessage(IPC::Connection&, IPC::Decoder&); >+ bool dispatchSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&); >+ >+ virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&); >+ virtual void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&) { }; >+ >+private: >+ virtual void connectionWillOpen(IPC::Connection&); >+ virtual void processWillShutDown(IPC::Connection&) = 0; >+ >+ Vector<std::pair<std::unique_ptr<IPC::Encoder>, OptionSet<IPC::SendOption>>> m_pendingMessages; >+ RefPtr<ProcessLauncher> m_processLauncher; >+ RefPtr<IPC::Connection> m_connection; >+ IPC::MessageReceiverMap m_messageReceiverMap; >+ bool m_alwaysRunsAtBackgroundPriority { false }; >+ WebCore::ProcessIdentifier m_processIdentifier { generateObjectIdentifier<WebCore::ProcessIdentifierType>() }; >+}; >+ >+template<typename T> >+bool ChildProcessProxy::send(T&& message, uint64_t destinationID, OptionSet<IPC::SendOption> sendOptions) >+{ >+ COMPILE_ASSERT(!T::isSync, AsyncMessageExpected); >+ >+ auto encoder = std::make_unique<IPC::Encoder>(T::receiverName(), T::name(), destinationID); >+ encoder->encode(message.arguments()); >+ >+ return sendMessage(WTFMove(encoder), sendOptions); >+} >+ >+template<typename U> >+bool ChildProcessProxy::sendSync(U&& message, typename U::Reply&& reply, uint64_t destinationID, Seconds timeout, OptionSet<IPC::SendSyncOption> sendSyncOptions) >+{ >+ COMPILE_ASSERT(U::isSync, SyncMessageExpected); >+ >+ if (!m_connection) >+ return false; >+ >+ TraceScope scope(SyncMessageStart, SyncMessageEnd); >+ >+ return connection()->sendSync(std::forward<U>(message), WTFMove(reply), destinationID, timeout, sendSyncOptions); >+} >+ >+template<typename T, typename... Args> >+void ChildProcessProxy::sendWithAsyncReply(T&& message, CompletionHandler<void(Args...)>&& completionHandler) >+{ >+ if (!m_connection) { >+ T::cancelReply(WTFMove(completionHandler)); >+ return; >+ } >+ >+ connection()->sendWithAsyncReply(std::forward<T>(message), WTFMove(completionHandler)); >+} >+ >+} // namespace WebKit > >Property changes on: Source/WebKit/UIProcess/AuxiliaryProcessProxy.h >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Index: Source/WebKit/UIProcess/AuxiliaryProcessProxy.h >=================================================================== >--- Source/WebKit/UIProcess/AuxiliaryProcessProxy.h (revision 240589) >+++ Source/WebKit/UIProcess/AuxiliaryProcessProxy.h (working copy) >@@ -36,14 +36,14 @@ > > namespace WebKit { > >-class ChildProcessProxy : ProcessLauncher::Client, public IPC::Connection::Client { >- WTF_MAKE_NONCOPYABLE(ChildProcessProxy); >+class AuxiliaryProcessProxy : ProcessLauncher::Client, public IPC::Connection::Client { >+ WTF_MAKE_NONCOPYABLE(AuxiliaryProcessProxy); > > protected: >- explicit ChildProcessProxy(bool alwaysRunsAtBackgroundPriority = false); >+ explicit AuxiliaryProcessProxy(bool alwaysRunsAtBackgroundPriority = false); > > public: >- virtual ~ChildProcessProxy(); >+ virtual ~AuxiliaryProcessProxy(); > > void connect(); > void terminate(); >@@ -109,7 +109,7 @@ private: > }; > > template<typename T> >-bool ChildProcessProxy::send(T&& message, uint64_t destinationID, OptionSet<IPC::SendOption> sendOptions) >+bool AuxiliaryProcessProxy::send(T&& message, uint64_t destinationID, OptionSet<IPC::SendOption> sendOptions) > { > COMPILE_ASSERT(!T::isSync, AsyncMessageExpected); > >@@ -120,7 +120,7 @@ bool ChildProcessProxy::send(T&& message > } > > template<typename U> >-bool ChildProcessProxy::sendSync(U&& message, typename U::Reply&& reply, uint64_t destinationID, Seconds timeout, OptionSet<IPC::SendSyncOption> sendSyncOptions) >+bool AuxiliaryProcessProxy::sendSync(U&& message, typename U::Reply&& reply, uint64_t destinationID, Seconds timeout, OptionSet<IPC::SendSyncOption> sendSyncOptions) > { > COMPILE_ASSERT(U::isSync, SyncMessageExpected); > >@@ -133,7 +133,7 @@ bool ChildProcessProxy::sendSync(U&& mes > } > > template<typename T, typename... Args> >-void ChildProcessProxy::sendWithAsyncReply(T&& message, CompletionHandler<void(Args...)>&& completionHandler) >+void AuxiliaryProcessProxy::sendWithAsyncReply(T&& message, CompletionHandler<void(Args...)>&& completionHandler) > { > if (!m_connection) { > T::cancelReply(WTFMove(completionHandler)); >Index: Source/WebKit/UIProcess/ChildProcessProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/ChildProcessProxy.cpp (revision 240589) >+++ Source/WebKit/UIProcess/ChildProcessProxy.cpp (nonexistent) >@@ -1,231 +0,0 @@ >-/* >- * Copyright (C) 2012-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. >- */ >- >-#include "config.h" >-#include "ChildProcessProxy.h" >- >-#include "ChildProcessMessages.h" >-#include <wtf/RunLoop.h> >- >-namespace WebKit { >- >-ChildProcessProxy::ChildProcessProxy(bool alwaysRunsAtBackgroundPriority) >- : m_alwaysRunsAtBackgroundPriority(alwaysRunsAtBackgroundPriority) >-{ >-} >- >-ChildProcessProxy::~ChildProcessProxy() >-{ >- if (m_connection) >- m_connection->invalidate(); >- >- if (m_processLauncher) { >- m_processLauncher->invalidate(); >- m_processLauncher = nullptr; >- } >-} >- >-void ChildProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) >-{ >- launchOptions.processIdentifier = m_processIdentifier; >- >- if (const char* userDirectorySuffix = getenv("DIRHELPER_USER_DIR_SUFFIX")) >- launchOptions.extraInitializationData.add("user-directory-suffix"_s, userDirectorySuffix); >- >- if (m_alwaysRunsAtBackgroundPriority) >- launchOptions.extraInitializationData.add("always-runs-at-background-priority"_s, "true"); >- >-#if ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE)) >- const char* varname; >- switch (launchOptions.processType) { >- case ProcessLauncher::ProcessType::Web: >- varname = "WEB_PROCESS_CMD_PREFIX"; >- break; >-#if ENABLE(NETSCAPE_PLUGIN_API) >- case ProcessLauncher::ProcessType::Plugin64: >- case ProcessLauncher::ProcessType::Plugin32: >- varname = "PLUGIN_PROCESS_CMD_PREFIX"; >- break; >-#endif >- case ProcessLauncher::ProcessType::Network: >- varname = "NETWORK_PROCESS_CMD_PREFIX"; >- break; >- } >- const char* processCmdPrefix = getenv(varname); >- if (processCmdPrefix && *processCmdPrefix) >- launchOptions.processCmdPrefix = String::fromUTF8(processCmdPrefix); >-#endif // ENABLE(DEVELOPER_MODE) && (PLATFORM(GTK) || PLATFORM(WPE)) >- >- platformGetLaunchOptions(launchOptions); >-} >- >-void ChildProcessProxy::connect() >-{ >- ASSERT(!m_processLauncher); >- ProcessLauncher::LaunchOptions launchOptions; >- getLaunchOptions(launchOptions); >- m_processLauncher = ProcessLauncher::create(this, launchOptions); >-} >- >-void ChildProcessProxy::terminate() >-{ >-#if PLATFORM(COCOA) >- if (m_connection && m_connection->kill()) >- return; >-#endif >- >- // FIXME: We should really merge process launching into IPC connection creation and get rid of the process launcher. >- if (m_processLauncher) >- m_processLauncher->terminateProcess(); >-} >- >-ChildProcessProxy::State ChildProcessProxy::state() const >-{ >- if (m_processLauncher && m_processLauncher->isLaunching()) >- return ChildProcessProxy::State::Launching; >- >- if (!m_connection) >- return ChildProcessProxy::State::Terminated; >- >- return ChildProcessProxy::State::Running; >-} >- >-bool ChildProcessProxy::sendMessage(std::unique_ptr<IPC::Encoder> encoder, OptionSet<IPC::SendOption> sendOptions) >-{ >- switch (state()) { >- case State::Launching: >- // If we're waiting for the child process to launch, we need to stash away the messages so we can send them once we have a connection. >- m_pendingMessages.append(std::make_pair(WTFMove(encoder), sendOptions)); >- return true; >- >- case State::Running: >- return connection()->sendMessage(WTFMove(encoder), sendOptions); >- >- case State::Terminated: >- return false; >- } >- >- return false; >-} >- >-void ChildProcessProxy::addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver& messageReceiver) >-{ >- m_messageReceiverMap.addMessageReceiver(messageReceiverName, messageReceiver); >-} >- >-void ChildProcessProxy::addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver& messageReceiver) >-{ >- m_messageReceiverMap.addMessageReceiver(messageReceiverName, destinationID, messageReceiver); >-} >- >-void ChildProcessProxy::removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID) >-{ >- m_messageReceiverMap.removeMessageReceiver(messageReceiverName, destinationID); >-} >- >-void ChildProcessProxy::removeMessageReceiver(IPC::StringReference messageReceiverName) >-{ >- m_messageReceiverMap.removeMessageReceiver(messageReceiverName); >-} >- >-bool ChildProcessProxy::dispatchMessage(IPC::Connection& connection, IPC::Decoder& decoder) >-{ >- return m_messageReceiverMap.dispatchMessage(connection, decoder); >-} >- >-bool ChildProcessProxy::dispatchSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder) >-{ >- return m_messageReceiverMap.dispatchSyncMessage(connection, decoder, replyEncoder); >-} >- >-void ChildProcessProxy::didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier connectionIdentifier) >-{ >- ASSERT(!m_connection); >- >- if (!IPC::Connection::identifierIsValid(connectionIdentifier)) >- return; >- >- m_connection = IPC::Connection::createServerConnection(connectionIdentifier, *this); >- >- connectionWillOpen(*m_connection); >- m_connection->open(); >- >- for (size_t i = 0; i < m_pendingMessages.size(); ++i) { >- std::unique_ptr<IPC::Encoder> message = WTFMove(m_pendingMessages[i].first); >- OptionSet<IPC::SendOption> sendOptions = m_pendingMessages[i].second; >- m_connection->sendMessage(WTFMove(message), sendOptions); >- } >- >- m_pendingMessages.clear(); >-} >- >-void ChildProcessProxy::shutDownProcess() >-{ >- switch (state()) { >- case State::Launching: >- m_processLauncher->invalidate(); >- m_processLauncher = nullptr; >- break; >- case State::Running: >-#if PLATFORM(IOS_FAMILY) >- // On iOS deploy a watchdog in the UI process, since the child process may be suspended. >- // If 30s is insufficient for any outstanding activity to complete cleanly, then it will be killed. >- ASSERT(m_connection); >- m_connection->terminateSoon(30_s); >-#endif >- break; >- case State::Terminated: >- return; >- } >- >- if (!m_connection) >- return; >- >- processWillShutDown(*m_connection); >- >- if (canSendMessage()) >- send(Messages::ChildProcess::ShutDown(), 0); >- >- m_connection->invalidate(); >- m_connection = nullptr; >-} >- >-void ChildProcessProxy::setProcessSuppressionEnabled(bool processSuppressionEnabled) >-{ >-#if PLATFORM(COCOA) >- if (state() != State::Running) >- return; >- >- connection()->send(Messages::ChildProcess::SetProcessSuppressionEnabled(processSuppressionEnabled), 0); >-#else >- UNUSED_PARAM(processSuppressionEnabled); >-#endif >-} >- >-void ChildProcessProxy::connectionWillOpen(IPC::Connection&) >-{ >-} >- >-} // namespace WebKit > >Property changes on: Source/WebKit/UIProcess/ChildProcessProxy.cpp >___________________________________________________________________ >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Index: Source/WebKit/UIProcess/ChildProcessProxy.h >=================================================================== >--- Source/WebKit/UIProcess/ChildProcessProxy.h (revision 240589) >+++ Source/WebKit/UIProcess/ChildProcessProxy.h (nonexistent) >@@ -1,146 +0,0 @@ >-/* >- * Copyright (C) 2012-2016 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 >- >-#include "Connection.h" >-#include "MessageReceiverMap.h" >-#include "ProcessLauncher.h" >- >-#include <WebCore/Process.h> >-#include <wtf/ProcessID.h> >-#include <wtf/SystemTracing.h> >-#include <wtf/ThreadSafeRefCounted.h> >- >-namespace WebKit { >- >-class ChildProcessProxy : ProcessLauncher::Client, public IPC::Connection::Client { >- WTF_MAKE_NONCOPYABLE(ChildProcessProxy); >- >-protected: >- explicit ChildProcessProxy(bool alwaysRunsAtBackgroundPriority = false); >- >-public: >- virtual ~ChildProcessProxy(); >- >- void connect(); >- void terminate(); >- >- template<typename T> bool send(T&& message, uint64_t destinationID, OptionSet<IPC::SendOption> sendOptions = { }); >- template<typename T> bool sendSync(T&& message, typename T::Reply&&, uint64_t destinationID, Seconds timeout = 1_s, OptionSet<IPC::SendSyncOption> sendSyncOptions = { }); >- template<typename T, typename... Args> void sendWithAsyncReply(T&&, CompletionHandler<void(Args...)>&&); >- >- IPC::Connection* connection() const >- { >- ASSERT(m_connection); >- return m_connection.get(); >- } >- >- bool hasConnection(const IPC::Connection& connection) const >- { >- return m_connection == &connection; >- } >- >- void addMessageReceiver(IPC::StringReference messageReceiverName, IPC::MessageReceiver&); >- void addMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID, IPC::MessageReceiver&); >- void removeMessageReceiver(IPC::StringReference messageReceiverName, uint64_t destinationID); >- void removeMessageReceiver(IPC::StringReference messageReceiverName); >- >- enum class State { >- Launching, >- Running, >- Terminated, >- }; >- State state() const; >- >- ProcessID processIdentifier() const { return m_processLauncher ? m_processLauncher->processIdentifier() : 0; } >- >- bool canSendMessage() const { return state() != State::Terminated;} >- bool sendMessage(std::unique_ptr<IPC::Encoder>, OptionSet<IPC::SendOption>); >- >- void shutDownProcess(); >- >- WebCore::ProcessIdentifier coreProcessIdentifier() const { return m_processIdentifier; } >- >- void setProcessSuppressionEnabled(bool); >- >-protected: >- // ProcessLauncher::Client >- void didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier) override; >- >- bool dispatchMessage(IPC::Connection&, IPC::Decoder&); >- bool dispatchSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&); >- >- virtual void getLaunchOptions(ProcessLauncher::LaunchOptions&); >- virtual void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&) { }; >- >-private: >- virtual void connectionWillOpen(IPC::Connection&); >- virtual void processWillShutDown(IPC::Connection&) = 0; >- >- Vector<std::pair<std::unique_ptr<IPC::Encoder>, OptionSet<IPC::SendOption>>> m_pendingMessages; >- RefPtr<ProcessLauncher> m_processLauncher; >- RefPtr<IPC::Connection> m_connection; >- IPC::MessageReceiverMap m_messageReceiverMap; >- bool m_alwaysRunsAtBackgroundPriority { false }; >- WebCore::ProcessIdentifier m_processIdentifier { generateObjectIdentifier<WebCore::ProcessIdentifierType>() }; >-}; >- >-template<typename T> >-bool ChildProcessProxy::send(T&& message, uint64_t destinationID, OptionSet<IPC::SendOption> sendOptions) >-{ >- COMPILE_ASSERT(!T::isSync, AsyncMessageExpected); >- >- auto encoder = std::make_unique<IPC::Encoder>(T::receiverName(), T::name(), destinationID); >- encoder->encode(message.arguments()); >- >- return sendMessage(WTFMove(encoder), sendOptions); >-} >- >-template<typename U> >-bool ChildProcessProxy::sendSync(U&& message, typename U::Reply&& reply, uint64_t destinationID, Seconds timeout, OptionSet<IPC::SendSyncOption> sendSyncOptions) >-{ >- COMPILE_ASSERT(U::isSync, SyncMessageExpected); >- >- if (!m_connection) >- return false; >- >- TraceScope scope(SyncMessageStart, SyncMessageEnd); >- >- return connection()->sendSync(std::forward<U>(message), WTFMove(reply), destinationID, timeout, sendSyncOptions); >-} >- >-template<typename T, typename... Args> >-void ChildProcessProxy::sendWithAsyncReply(T&& message, CompletionHandler<void(Args...)>&& completionHandler) >-{ >- if (!m_connection) { >- T::cancelReply(WTFMove(completionHandler)); >- return; >- } >- >- connection()->sendWithAsyncReply(std::forward<T>(message), WTFMove(completionHandler)); >-} >- >-} // namespace WebKit > >Property changes on: Source/WebKit/UIProcess/ChildProcessProxy.h >___________________________________________________________________ >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Index: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h >=================================================================== >--- Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h (revision 240589) >+++ Source/WebKit/UIProcess/ServiceWorkerProcessProxy.h (working copy) >@@ -51,7 +51,7 @@ public: > uint64_t pageID() const { return m_serviceWorkerPageID; } > > private: >- // ChildProcessProxy >+ // AuxiliaryProcessProxy > void getLaunchOptions(ProcessLauncher::LaunchOptions&) final; > > // ProcessLauncher::Client >Index: Source/WebKit/UIProcess/WebPageProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.cpp (revision 240589) >+++ Source/WebKit/UIProcess/WebPageProxy.cpp (working copy) >@@ -797,9 +797,9 @@ void WebPageProxy::swapToWebProcess(Ref< > > void WebPageProxy::finishAttachingToWebProcess(ShouldInitializeWebPage shouldInitializePage) > { >- ASSERT(m_process->state() != ChildProcessProxy::State::Terminated); >+ ASSERT(m_process->state() != AuxiliaryProcessProxy::State::Terminated); > >- if (m_process->state() == ChildProcessProxy::State::Running) { >+ if (m_process->state() == AuxiliaryProcessProxy::State::Running) { > m_webProcessLifetimeTracker.webPageEnteringWebProcess(); > processDidFinishLaunching(); > } >Index: Source/WebKit/UIProcess/WebProcessPool.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebProcessPool.cpp (revision 240589) >+++ Source/WebKit/UIProcess/WebProcessPool.cpp (working copy) >@@ -36,7 +36,7 @@ > #include "APINavigation.h" > #include "APIPageConfiguration.h" > #include "APIProcessPoolConfiguration.h" >-#include "ChildProcessMessages.h" >+#include "AuxiliaryProcessMessages.h" > #include "DownloadProxy.h" > #include "DownloadProxyMessages.h" > #include "GamepadData.h" >@@ -442,8 +442,8 @@ void WebProcessPool::fullKeyboardAccessM > #if OS(LINUX) > void WebProcessPool::sendMemoryPressureEvent(bool isCritical) > { >- sendToAllProcesses(Messages::ChildProcess::DidReceiveMemoryPressureEvent(isCritical)); >- sendToNetworkingProcess(Messages::ChildProcess::DidReceiveMemoryPressureEvent(isCritical)); >+ sendToAllProcesses(Messages::AuxiliaryProcess::DidReceiveMemoryPressureEvent(isCritical)); >+ sendToNetworkingProcess(Messages::AuxiliaryProcess::DidReceiveMemoryPressureEvent(isCritical)); > #if ENABLE(NETSCAPE_PLUGIN_API) > PluginProcessManager::singleton().sendMemoryPressureEvent(isCritical); > #endif >@@ -1482,9 +1482,9 @@ void WebProcessPool::registerURLSchemeAs > void WebProcessPool::registerURLSchemeServiceWorkersCanHandle(const String& urlScheme) > { > m_schemesServiceWorkersCanHandle.add(urlScheme); >- sendToAllProcesses(Messages::ChildProcess::RegisterURLSchemeServiceWorkersCanHandle(urlScheme)); >+ sendToAllProcesses(Messages::AuxiliaryProcess::RegisterURLSchemeServiceWorkersCanHandle(urlScheme)); > if (m_networkProcess) >- m_networkProcess->send(Messages::ChildProcess::RegisterURLSchemeServiceWorkersCanHandle(urlScheme), 0); >+ m_networkProcess->send(Messages::AuxiliaryProcess::RegisterURLSchemeServiceWorkersCanHandle(urlScheme), 0); > } > > void WebProcessPool::registerURLSchemeAsCanDisplayOnlyIfCanRequest(const String& urlScheme) >Index: Source/WebKit/UIProcess/WebProcessProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebProcessProxy.cpp (revision 240589) >+++ Source/WebKit/UIProcess/WebProcessProxy.cpp (working copy) >@@ -129,7 +129,7 @@ Ref<WebProcessProxy> WebProcessProxy::cr > } > > WebProcessProxy::WebProcessProxy(WebProcessPool& processPool, WebsiteDataStore& websiteDataStore, IsPrewarmed isPrewarmed) >- : ChildProcessProxy(processPool.alwaysRunsAtBackgroundPriority()) >+ : AuxiliaryProcessProxy(processPool.alwaysRunsAtBackgroundPriority()) > , m_responsivenessTimer(*this) > , m_backgroundResponsivenessTimer(*this) > , m_processPool(processPool, isPrewarmed == IsPrewarmed::Yes ? IsWeak::Yes : IsWeak::No) >@@ -180,7 +180,7 @@ void WebProcessProxy::getLaunchOptions(P > { > launchOptions.processType = ProcessLauncher::ProcessType::Web; > >- ChildProcessProxy::getLaunchOptions(launchOptions); >+ AuxiliaryProcessProxy::getLaunchOptions(launchOptions); > > if (!m_processPool->customWebContentServiceBundleIdentifier().isEmpty()) > launchOptions.customWebContentServiceBundleIdentifier = m_processPool->customWebContentServiceBundleIdentifier().ascii(); >@@ -654,7 +654,7 @@ void WebProcessProxy::didFinishLaunching > { > RELEASE_ASSERT(isMainThreadOrCheckDisabled()); > >- ChildProcessProxy::didFinishLaunching(launcher, connectionIdentifier); >+ AuxiliaryProcessProxy::didFinishLaunching(launcher, connectionIdentifier); > > if (!IPC::Connection::identifierIsValid(connectionIdentifier)) { > RELEASE_LOG_IF(m_websiteDataStore->sessionID().isAlwaysOnLoggingAllowed(), Process, "%p - WebProcessProxy didFinishLaunching - invalid connection identifier (web process failed to launch)", this); >@@ -758,13 +758,13 @@ void WebProcessProxy::didDestroyUserGest > > void WebProcessProxy::maybeShutDown() > { >- if (state() == State::Terminated || !canTerminateChildProcess()) >+ if (state() == State::Terminated || !canTerminateAuxiliaryProcess()) > return; > > shutDown(); > } > >-bool WebProcessProxy::canTerminateChildProcess() >+bool WebProcessProxy::canTerminateAuxiliaryProcess() > { > if (!m_pageMap.isEmpty() || m_processPool->hasSuspendedPageFor(*this) || !m_provisionalPages.isEmpty()) > return false; >@@ -777,7 +777,7 @@ bool WebProcessProxy::canTerminateChildP > > void WebProcessProxy::shouldTerminate(bool& shouldTerminate) > { >- shouldTerminate = canTerminateChildProcess(); >+ shouldTerminate = canTerminateAuxiliaryProcess(); > if (shouldTerminate) { > // We know that the web process is going to terminate so start shutting it down in the UI process. > shutDown(); >@@ -871,7 +871,7 @@ void WebProcessProxy::requestTermination > auto protectedThis = makeRef(*this); > RELEASE_LOG_IF(m_websiteDataStore->sessionID().isAlwaysOnLoggingAllowed(), Process, "%p - WebProcessProxy::requestTermination - reason %d", this, reason); > >- ChildProcessProxy::terminate(); >+ AuxiliaryProcessProxy::terminate(); > > if (webConnection()) > webConnection()->didClose(); >Index: Source/WebKit/UIProcess/WebProcessProxy.h >=================================================================== >--- Source/WebKit/UIProcess/WebProcessProxy.h (revision 240589) >+++ Source/WebKit/UIProcess/WebProcessProxy.h (working copy) >@@ -26,8 +26,8 @@ > #pragma once > > #include "APIUserInitiatedAction.h" >+#include "AuxiliaryProcessProxy.h" > #include "BackgroundProcessResponsivenessTimer.h" >-#include "ChildProcessProxy.h" > #include "MessageReceiverMap.h" > #include "PluginInfoStore.h" > #include "ProcessLauncher.h" >@@ -94,7 +94,7 @@ typedef RefCounter<BackgroundWebProcessC > typedef BackgroundWebProcessCounter::Token BackgroundWebProcessToken; > #endif > >-class WebProcessProxy : public ChildProcessProxy, public ResponsivenessTimer::Client, public ThreadSafeRefCounted<WebProcessProxy>, public CanMakeWeakPtr<WebProcessProxy>, private ProcessThrottlerClient { >+class WebProcessProxy : public AuxiliaryProcessProxy, public ResponsivenessTimer::Client, public ThreadSafeRefCounted<WebProcessProxy>, public CanMakeWeakPtr<WebProcessProxy>, private ProcessThrottlerClient { > public: > typedef HashMap<uint64_t, RefPtr<WebFrameProxy>> WebFrameProxyMap; > typedef HashMap<uint64_t, WebPageProxy*> WebPageProxyMap; >@@ -256,7 +256,7 @@ protected: > static uint64_t generatePageID(); > WebProcessProxy(WebProcessPool&, WebsiteDataStore&, IsPrewarmed); > >- // ChildProcessProxy >+ // AuxiliaryProcessProxy > void getLaunchOptions(ProcessLauncher::LaunchOptions&) override; > void platformGetLaunchOptions(ProcessLauncher::LaunchOptions&) override; > void connectionWillOpen(IPC::Connection&) override; >@@ -332,7 +332,7 @@ private: > void didReceiveWebProcessProxyMessage(IPC::Connection&, IPC::Decoder&); > void didReceiveSyncWebProcessProxyMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&); > >- bool canTerminateChildProcess(); >+ bool canTerminateAuxiliaryProcess(); > > void didCollectPrewarmInformation(const String& domain, const WebCore::PrewarmInformation&); > >Index: Source/WebKit/UIProcess/Authentication/AuthenticationChallengeProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/Authentication/AuthenticationChallengeProxy.cpp (revision 240589) >+++ Source/WebKit/UIProcess/Authentication/AuthenticationChallengeProxy.cpp (working copy) >@@ -30,7 +30,7 @@ > #include "AuthenticationDecisionListener.h" > #include "AuthenticationManager.h" > #include "AuthenticationManagerMessages.h" >-#include "ChildProcessProxy.h" >+#include "AuxiliaryProcessProxy.h" > #include "WebCertificateInfo.h" > #include "WebCoreArgumentCoders.h" > #include "WebCredential.h" >Index: Source/WebKit/UIProcess/Authentication/AuthenticationChallengeProxy.h >=================================================================== >--- Source/WebKit/UIProcess/Authentication/AuthenticationChallengeProxy.h (revision 240589) >+++ Source/WebKit/UIProcess/Authentication/AuthenticationChallengeProxy.h (working copy) >@@ -36,7 +36,6 @@ class Connection; > namespace WebKit { > > class AuthenticationDecisionListener; >-class ChildProcessProxy; > class SecKeyProxyStore; > class WebCredential; > class WebProtectionSpace; >Index: Source/WebKit/UIProcess/Downloads/DownloadProxyMap.cpp >=================================================================== >--- Source/WebKit/UIProcess/Downloads/DownloadProxyMap.cpp (revision 240589) >+++ Source/WebKit/UIProcess/Downloads/DownloadProxyMap.cpp (working copy) >@@ -26,7 +26,7 @@ > #include "config.h" > #include "DownloadProxyMap.h" > >-#include "ChildProcessProxy.h" >+#include "AuxiliaryProcessProxy.h" > #include "DownloadProxy.h" > #include "DownloadProxyMessages.h" > #include "MessageReceiverMap.h" >@@ -34,8 +34,8 @@ > > namespace WebKit { > >-DownloadProxyMap::DownloadProxyMap(ChildProcessProxy* process) >- : m_process(process) >+DownloadProxyMap::DownloadProxyMap(NetworkProcessProxy& process) >+ : m_process(&process) > { > } > >Index: Source/WebKit/UIProcess/Downloads/DownloadProxyMap.h >=================================================================== >--- Source/WebKit/UIProcess/Downloads/DownloadProxyMap.h (revision 240589) >+++ Source/WebKit/UIProcess/Downloads/DownloadProxyMap.h (working copy) >@@ -23,8 +23,7 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef DownloadProxyMap_h >-#define DownloadProxyMap_h >+#pragma once > > #include "DownloadID.h" > #include <wtf/HashMap.h> >@@ -36,15 +35,15 @@ class ResourceRequest; > > namespace WebKit { > >-class ChildProcessProxy; > class DownloadProxy; >+class NetworkProcessProxy; > class WebProcessPool; > > class DownloadProxyMap { > WTF_MAKE_NONCOPYABLE(DownloadProxyMap); > > public: >- explicit DownloadProxyMap(ChildProcessProxy*); >+ explicit DownloadProxyMap(NetworkProcessProxy&); > ~DownloadProxyMap(); > > DownloadProxy* createDownloadProxy(WebProcessPool&, const WebCore::ResourceRequest&); >@@ -55,10 +54,8 @@ public: > void processDidClose(); > > private: >- ChildProcessProxy* m_process; >+ NetworkProcessProxy* m_process; > HashMap<DownloadID, RefPtr<DownloadProxy>> m_downloads; > }; > > } // namespace WebKit >- >-#endif // DownloadProxyMap_h >Index: Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (revision 240589) >+++ Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (working copy) >@@ -72,7 +72,7 @@ static uint64_t generateCallbackID() > } > > NetworkProcessProxy::NetworkProcessProxy(WebProcessPool& processPool) >- : ChildProcessProxy(processPool.alwaysRunsAtBackgroundPriority()) >+ : AuxiliaryProcessProxy(processPool.alwaysRunsAtBackgroundPriority()) > , m_processPool(processPool) > , m_numPendingConnectionRequests(0) > #if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER) >@@ -103,7 +103,7 @@ NetworkProcessProxy::~NetworkProcessProx > void NetworkProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) > { > launchOptions.processType = ProcessLauncher::ProcessType::Network; >- ChildProcessProxy::getLaunchOptions(launchOptions); >+ AuxiliaryProcessProxy::getLaunchOptions(launchOptions); > > if (processPool().shouldMakeNextNetworkProcessLaunchFailForTesting()) { > processPool().setShouldMakeNextNetworkProcessLaunchFailForTesting(false); >@@ -149,7 +149,7 @@ void NetworkProcessProxy::getNetworkProc > DownloadProxy* NetworkProcessProxy::createDownloadProxy(const ResourceRequest& resourceRequest) > { > if (!m_downloadProxyMap) >- m_downloadProxyMap = std::make_unique<DownloadProxyMap>(this); >+ m_downloadProxyMap = std::make_unique<DownloadProxyMap>(*this); > > return m_downloadProxyMap->createDownloadProxy(m_processPool, resourceRequest); > } >@@ -334,7 +334,7 @@ void NetworkProcessProxy::didDeleteWebsi > > void NetworkProcessProxy::didFinishLaunching(ProcessLauncher* launcher, IPC::Connection::Identifier connectionIdentifier) > { >- ChildProcessProxy::didFinishLaunching(launcher, connectionIdentifier); >+ AuxiliaryProcessProxy::didFinishLaunching(launcher, connectionIdentifier); > > if (!IPC::Connection::identifierIsValid(connectionIdentifier)) { > networkProcessCrashed(); >Index: Source/WebKit/UIProcess/Network/NetworkProcessProxy.h >=================================================================== >--- Source/WebKit/UIProcess/Network/NetworkProcessProxy.h (revision 240589) >+++ Source/WebKit/UIProcess/Network/NetworkProcessProxy.h (working copy) >@@ -26,7 +26,7 @@ > #pragma once > > #include "APIWebsiteDataStore.h" >-#include "ChildProcessProxy.h" >+#include "AuxiliaryProcessProxy.h" > #if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER) > #include "LegacyCustomProtocolManagerProxy.h" > #endif >@@ -65,7 +65,7 @@ struct NetworkProcessCreationParameters; > class WebUserContentControllerProxy; > struct WebsiteData; > >-class NetworkProcessProxy final : public ChildProcessProxy, private ProcessThrottlerClient { >+class NetworkProcessProxy final : public AuxiliaryProcessProxy, private ProcessThrottlerClient { > public: > explicit NetworkProcessProxy(WebProcessPool&); > ~NetworkProcessProxy(); >@@ -152,7 +152,7 @@ public: > void removeSession(PAL::SessionID); > > private: >- // ChildProcessProxy >+ // AuxiliaryProcessProxy > void getLaunchOptions(ProcessLauncher::LaunchOptions&) override; > void connectionWillOpen(IPC::Connection&) override; > void processWillShutDown(IPC::Connection&) override; >Index: Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp (revision 240589) >+++ Source/WebKit/UIProcess/Plugins/PluginProcessProxy.cpp (working copy) >@@ -28,7 +28,7 @@ > > #if ENABLE(NETSCAPE_PLUGIN_API) > >-#include "ChildProcessMessages.h" >+#include "AuxiliaryProcessMessages.h" > #include "PluginProcessConnectionManagerMessages.h" > #include "PluginProcessCreationParameters.h" > #include "PluginProcessManager.h" >@@ -88,7 +88,7 @@ PluginProcessProxy::~PluginProcessProxy( > void PluginProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) > { > platformGetLaunchOptionsWithAttributes(launchOptions, m_pluginProcessAttributes); >- ChildProcessProxy::getLaunchOptions(launchOptions); >+ AuxiliaryProcessProxy::getLaunchOptions(launchOptions); > } > > void PluginProcessProxy::processWillShutDown(IPC::Connection& connection) >@@ -157,7 +157,7 @@ void PluginProcessProxy::sendMemoryPress > if (state() == State::Launching) > return; > >- m_connection->send(Messages::ChildProcess::DidReceiveMemoryPressureEvent(isCritical), 0); >+ m_connection->send(Messages::AuxiliaryProcess::DidReceiveMemoryPressureEvent(isCritical), 0); > } > #endif > >Index: Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h >=================================================================== >--- Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h (revision 240589) >+++ Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h (working copy) >@@ -23,12 +23,11 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef PluginProcessProxy_h >-#define PluginProcessProxy_h >+#pragma once > > #if ENABLE(NETSCAPE_PLUGIN_API) > >-#include "ChildProcessProxy.h" >+#include "AuxiliaryProcessProxy.h" > #include "Connection.h" > #include "PluginModuleInfo.h" > #include "PluginProcess.h" >@@ -66,7 +65,7 @@ int pluginProcessLatencyQOS(); > int pluginProcessThroughputQOS(); > #endif > >-class PluginProcessProxy final : public ChildProcessProxy, public ThreadSafeRefCounted<PluginProcessProxy> { >+class PluginProcessProxy final : public AuxiliaryProcessProxy, public ThreadSafeRefCounted<PluginProcessProxy> { > public: > static Ref<PluginProcessProxy> create(PluginProcessManager*, const PluginProcessAttributes&, uint64_t pluginProcessToken); > ~PluginProcessProxy(); >@@ -183,5 +182,3 @@ private: > } // namespace WebKit > > #endif // ENABLE(NETSCAPE_PLUGIN_API) >- >-#endif // PluginProcessProxy_h >Index: Source/WebKit/WebKit.xcodeproj/project.pbxproj >=================================================================== >--- Source/WebKit/WebKit.xcodeproj/project.pbxproj (revision 240589) >+++ Source/WebKit/WebKit.xcodeproj/project.pbxproj (working copy) >@@ -177,7 +177,7 @@ > 1A2D84A3127F6AD1001EB962 /* NPVariantData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2D84A1127F6AD1001EB962 /* NPVariantData.h */; }; > 1A2D90D21281C966001EB962 /* PluginProcessCreationParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2D90D01281C966001EB962 /* PluginProcessCreationParameters.h */; }; > 1A2D91A61281D739001EB962 /* PluginControllerProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A2D91A51281D739001EB962 /* PluginControllerProxyMac.mm */; }; >- 1A2D956F12848564001EB962 /* ChildProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2D956D12848564001EB962 /* ChildProcess.h */; }; >+ 1A2D956F12848564001EB962 /* AuxiliaryProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2D956D12848564001EB962 /* AuxiliaryProcess.h */; }; > 1A30066E1110F4F70031937C /* ResponsivenessTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A30066C1110F4F70031937C /* ResponsivenessTimer.h */; }; > 1A334DED16DE8F88006A8E38 /* StorageAreaMapMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A334DEB16DE8F88006A8E38 /* StorageAreaMapMessageReceiver.cpp */; }; > 1A334DEE16DE8F88006A8E38 /* StorageAreaMapMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A334DEC16DE8F88006A8E38 /* StorageAreaMapMessages.h */; }; >@@ -423,7 +423,7 @@ > 26F9A83B18A3468100AEB88A /* WKWebViewPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 26F9A83A18A3463F00AEB88A /* WKWebViewPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 2749F6442146561B008380BF /* InjectedBundleNodeHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC4BEEAA120A0A5F00FBA0C7 /* InjectedBundleNodeHandle.cpp */; }; > 2749F6452146561E008380BF /* InjectedBundleRangeHandle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC33E0D012408E8600360F3F /* InjectedBundleRangeHandle.cpp */; }; >- 290F4272172A0C7400939FF0 /* ChildProcessSupplement.h in Headers */ = {isa = PBXBuildFile; fileRef = 290F4271172A0C7400939FF0 /* ChildProcessSupplement.h */; }; >+ 290F4272172A0C7400939FF0 /* AuxiliaryProcessSupplement.h in Headers */ = {isa = PBXBuildFile; fileRef = 290F4271172A0C7400939FF0 /* AuxiliaryProcessSupplement.h */; }; > 29232DF418B29D6800D0596F /* WKAccessibilityWebPageObjectMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 29232DF318B29D6800D0596F /* WKAccessibilityWebPageObjectMac.h */; }; > 293EBEAB1627D9C9005F89F1 /* WKDOMText.h in Headers */ = {isa = PBXBuildFile; fileRef = 293EBEA91627D9C9005F89F1 /* WKDOMText.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 29501724162A4504004A9D71 /* WKWebProcessPlugInBrowserContextControllerPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 29501723162A4504004A9D71 /* WKWebProcessPlugInBrowserContextControllerPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -679,7 +679,7 @@ > 2D92A783212B6A7100F493FD /* StringReference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AE00D6918327C1200087DD7 /* StringReference.cpp */; }; > 2D92A784212B6AB100F493FD /* ActivityAssertion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7D792D51767CB6E00881CBE /* ActivityAssertion.cpp */; }; > 2D92A785212B6AB100F493FD /* BlobDataFileReferenceWithSandboxExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E164A2EF191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.cpp */; }; >- 2D92A786212B6AB100F493FD /* ChildProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2D956E12848564001EB962 /* ChildProcess.cpp */; }; >+ 2D92A786212B6AB100F493FD /* AuxiliaryProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A2D956E12848564001EB962 /* AuxiliaryProcess.cpp */; }; > 2D92A787212B6AB100F493FD /* ShareableBitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A6420E212DCE2FF00CAAE2C /* ShareableBitmap.cpp */; }; > 2D92A788212B6AB100F493FD /* WebCoreArgumentCoders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 939AE7651316E99C00AE06A6 /* WebCoreArgumentCoders.cpp */; }; > 2D92A789212B6AB100F493FD /* WebEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C0337DAD127A24FE008FF4F4 /* WebEvent.cpp */; }; >@@ -1006,8 +1006,8 @@ > 51F060E11654318500F3282F /* WebMDNSRegisterMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F060DD1654317500F3282F /* WebMDNSRegisterMessageReceiver.cpp */; }; > 51F060E11654318500F3283F /* NetworkMDNSRegisterMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51F060DD1654317500F3283F /* NetworkMDNSRegisterMessageReceiver.cpp */; }; > 51F886A61F2C228100C193EF /* WKTestingSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F886A41F2C214A00C193EF /* WKTestingSupport.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 51FAEC3A1B0657630009C4E7 /* ChildProcessMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FAEC371B0657310009C4E7 /* ChildProcessMessages.h */; }; >- 51FAEC3B1B0657680009C4E7 /* ChildProcessMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51FAEC361B0657310009C4E7 /* ChildProcessMessageReceiver.cpp */; }; >+ 51FAEC3A1B0657630009C4E7 /* AuxiliaryProcessMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FAEC371B0657310009C4E7 /* AuxiliaryProcessMessages.h */; }; >+ 51FAEC3B1B0657680009C4E7 /* AuxiliaryProcessMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51FAEC361B0657310009C4E7 /* AuxiliaryProcessMessageReceiver.cpp */; }; > 51FD18B61651FBAD00DBE1CE /* NetworkResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FD18B41651FBAD00DBE1CE /* NetworkResourceLoader.h */; }; > 5272B28B1406985D0096A5D0 /* StatisticsData.h in Headers */ = {isa = PBXBuildFile; fileRef = 5272B2891406985D0096A5D0 /* StatisticsData.h */; }; > 5272D4C91E735F0900EB4290 /* WKProtectionSpaceNS.h in Headers */ = {isa = PBXBuildFile; fileRef = 5272D4C71E735F0900EB4290 /* WKProtectionSpaceNS.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -1582,7 +1582,7 @@ > E105FE5418D7B9DE008F57A8 /* EditingRange.h in Headers */ = {isa = PBXBuildFile; fileRef = E105FE5318D7B9DE008F57A8 /* EditingRange.h */; }; > E11D35AE16B63D1B006D23D7 /* com.apple.WebProcess.sb in Resources */ = {isa = PBXBuildFile; fileRef = E1967E37150AB5E200C73169 /* com.apple.WebProcess.sb */; }; > E14A954A16E016A40068DE82 /* NetworkProcessPlatformStrategies.h in Headers */ = {isa = PBXBuildFile; fileRef = E14A954816E016A40068DE82 /* NetworkProcessPlatformStrategies.h */; }; >- E1513C67166EABB200149FCB /* ChildProcessProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E1513C65166EABB200149FCB /* ChildProcessProxy.h */; }; >+ E1513C67166EABB200149FCB /* AuxiliaryProcessProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E1513C65166EABB200149FCB /* AuxiliaryProcessProxy.h */; }; > E152551A17011819003D7ADB /* NetworkResourceLoaderMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E152551817011819003D7ADB /* NetworkResourceLoaderMessageReceiver.cpp */; }; > E152551B17011819003D7ADB /* NetworkResourceLoaderMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = E152551917011819003D7ADB /* NetworkResourceLoaderMessages.h */; }; > E164A2F2191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = E164A2F0191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.h */; }; >@@ -2018,8 +2018,8 @@ > 1A2D90D11281C966001EB962 /* PluginProcessCreationParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PluginProcessCreationParameters.cpp; sourceTree = "<group>"; }; > 1A2D91A51281D739001EB962 /* PluginControllerProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginControllerProxyMac.mm; sourceTree = "<group>"; }; > 1A2D92201281DC1B001EB962 /* PluginProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginProxyMac.mm; sourceTree = "<group>"; }; >- 1A2D956D12848564001EB962 /* ChildProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildProcess.h; sourceTree = "<group>"; }; >- 1A2D956E12848564001EB962 /* ChildProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChildProcess.cpp; sourceTree = "<group>"; }; >+ 1A2D956D12848564001EB962 /* AuxiliaryProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuxiliaryProcess.h; sourceTree = "<group>"; }; >+ 1A2D956E12848564001EB962 /* AuxiliaryProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuxiliaryProcess.cpp; sourceTree = "<group>"; }; > 1A30066C1110F4F70031937C /* ResponsivenessTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResponsivenessTimer.h; sourceTree = "<group>"; }; > 1A30EAC5115D7DA30053E937 /* ConnectionMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ConnectionMac.mm; sourceTree = "<group>"; }; > 1A334DEA16DE8B68006A8E38 /* StorageAreaMap.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = StorageAreaMap.messages.in; sourceTree = "<group>"; }; >@@ -2108,7 +2108,7 @@ > 1A6563E31B7A8C50009CF787 /* APIWindowFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIWindowFeatures.h; sourceTree = "<group>"; }; > 1A66BF8E18A052ED002071B4 /* WKWebViewInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebViewInternal.h; sourceTree = "<group>"; }; > 1A67CD2D1CBC513F00BFE3EA /* WKOpenPanelParametersInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKOpenPanelParametersInternal.h; sourceTree = "<group>"; }; >- 1A698F171E4910220064E881 /* ChildProcessCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ChildProcessCocoa.mm; sourceTree = "<group>"; }; >+ 1A698F171E4910220064E881 /* AuxiliaryProcessCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AuxiliaryProcessCocoa.mm; sourceTree = "<group>"; }; > 1A6D86BF1DF75265007745E8 /* MachMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MachMessage.cpp; sourceTree = "<group>"; }; > 1A6D86C01DF75265007745E8 /* MachMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MachMessage.h; sourceTree = "<group>"; }; > 1A6FA21D1BD0435B00AAA650 /* WKFrameInfoPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFrameInfoPrivate.h; sourceTree = "<group>"; }; >@@ -2441,7 +2441,7 @@ > 26F10BE619187E2E001D0E68 /* WKSyntheticClickTapGestureRecognizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKSyntheticClickTapGestureRecognizer.h; path = ios/WKSyntheticClickTapGestureRecognizer.h; sourceTree = "<group>"; }; > 26F10BE719187E2E001D0E68 /* WKSyntheticClickTapGestureRecognizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WKSyntheticClickTapGestureRecognizer.m; path = ios/WKSyntheticClickTapGestureRecognizer.m; sourceTree = "<group>"; }; > 26F9A83A18A3463F00AEB88A /* WKWebViewPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WKWebViewPrivate.h; sourceTree = "<group>"; }; >- 290F4271172A0C7400939FF0 /* ChildProcessSupplement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildProcessSupplement.h; sourceTree = "<group>"; }; >+ 290F4271172A0C7400939FF0 /* AuxiliaryProcessSupplement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuxiliaryProcessSupplement.h; sourceTree = "<group>"; }; > 29232DF118B29D1100D0596F /* WKAccessibilityWebPageObjectMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKAccessibilityWebPageObjectMac.mm; sourceTree = "<group>"; }; > 29232DF318B29D6800D0596F /* WKAccessibilityWebPageObjectMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKAccessibilityWebPageObjectMac.h; sourceTree = "<group>"; }; > 29232DF518B29DCE00D0596F /* WKAccessibilityWebPageObjectIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKAccessibilityWebPageObjectIOS.h; sourceTree = "<group>"; }; >@@ -3213,7 +3213,7 @@ > 515E7725183DD6F60007203F /* AsyncRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AsyncRequest.cpp; sourceTree = "<group>"; }; > 515E7726183DD6F60007203F /* AsyncRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AsyncRequest.h; sourceTree = "<group>"; }; > 5160BFE013381DF900918999 /* LoggingFoundation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LoggingFoundation.mm; sourceTree = "<group>"; }; >- 5164C0941B05B757004F102A /* ChildProcess.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChildProcess.messages.in; sourceTree = "<group>"; }; >+ 5164C0941B05B757004F102A /* AuxiliaryProcess.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AuxiliaryProcess.messages.in; sourceTree = "<group>"; }; > 516A4A5B120A2CCD00C05B7F /* APIError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIError.h; sourceTree = "<group>"; }; > 517A33B3130B308C00F80CB5 /* WKApplicationCacheManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKApplicationCacheManager.cpp; sourceTree = "<group>"; }; > 517A33B4130B308C00F80CB5 /* WKApplicationCacheManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKApplicationCacheManager.h; sourceTree = "<group>"; }; >@@ -3326,8 +3326,8 @@ > 51FA2D5A15211A1E00C1BA0B /* InjectedBundleDOMWindowExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleDOMWindowExtension.h; sourceTree = "<group>"; }; > 51FA2D5C15211A5000C1BA0B /* InjectedBundleDOMWindowExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleDOMWindowExtension.cpp; sourceTree = "<group>"; }; > 51FA2D7515212E1E00C1BA0B /* WKBundleDOMWindowExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKBundleDOMWindowExtension.cpp; sourceTree = "<group>"; }; >- 51FAEC361B0657310009C4E7 /* ChildProcessMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChildProcessMessageReceiver.cpp; path = DerivedSources/WebKit2/ChildProcessMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; >- 51FAEC371B0657310009C4E7 /* ChildProcessMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChildProcessMessages.h; path = DerivedSources/WebKit2/ChildProcessMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; >+ 51FAEC361B0657310009C4E7 /* AuxiliaryProcessMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AuxiliaryProcessMessageReceiver.cpp; path = DerivedSources/WebKit2/AuxiliaryProcessMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; >+ 51FAEC371B0657310009C4E7 /* AuxiliaryProcessMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AuxiliaryProcessMessages.h; path = DerivedSources/WebKit2/AuxiliaryProcessMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; > 51FB0902163A3B1C00EC324A /* NetworkProcessConnection.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; name = NetworkProcessConnection.messages.in; path = Network/NetworkProcessConnection.messages.in; sourceTree = "<group>"; }; > 51FD18B31651FBAD00DBE1CE /* NetworkResourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkResourceLoader.cpp; sourceTree = "<group>"; }; > 51FD18B41651FBAD00DBE1CE /* NetworkResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkResourceLoader.h; sourceTree = "<group>"; }; >@@ -3813,7 +3813,7 @@ > 99F642D21FABE378009621E9 /* CoordinateSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoordinateSystem.h; sourceTree = "<group>"; }; > 9BC59D6C1EFCCCB6001E8D09 /* CallbackID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CallbackID.h; sourceTree = "<group>"; }; > 9BC59D6D1EFCDC6D001E8D09 /* OptionalCallbackID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OptionalCallbackID.h; sourceTree = "<group>"; }; >- 9F54F88E16488E87007DF81A /* ChildProcessMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ChildProcessMac.mm; sourceTree = "<group>"; }; >+ 9F54F88E16488E87007DF81A /* AuxiliaryProcessMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AuxiliaryProcessMac.mm; sourceTree = "<group>"; }; > 9F54F8941648AE0E007DF81A /* PluginProcessManagerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PluginProcessManagerMac.mm; sourceTree = "<group>"; }; > 9FB5F392169E6A80002C25BF /* WKContextPrivateMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKContextPrivateMac.mm; path = mac/WKContextPrivateMac.mm; sourceTree = "<group>"; }; > 9FB5F393169E6A80002C25BF /* WKContextPrivateMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WKContextPrivateMac.h; path = mac/WKContextPrivateMac.h; sourceTree = "<group>"; }; >@@ -3907,7 +3907,7 @@ > A7BD9863194653D400D35698 /* Databases-iOS.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Databases-iOS.entitlements"; sourceTree = "<group>"; }; > A7D792D41767CB0900881CBE /* ActivityAssertion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ActivityAssertion.h; sourceTree = "<group>"; }; > A7D792D51767CB6E00881CBE /* ActivityAssertion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ActivityAssertion.cpp; sourceTree = "<group>"; }; >- A7E93CEB192531AA00A1DC48 /* ChildProcessIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ChildProcessIOS.mm; path = ios/ChildProcessIOS.mm; sourceTree = "<group>"; }; >+ A7E93CEB192531AA00A1DC48 /* AuxiliaryProcessIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AuxiliaryProcessIOS.mm; path = ios/AuxiliaryProcessIOS.mm; sourceTree = "<group>"; }; > B396EA5512E0ED2D00F4FEB7 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; }; > B62E730F143047A60069EC35 /* WKHitTestResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKHitTestResult.cpp; sourceTree = "<group>"; }; > B62E7311143047B00069EC35 /* WKHitTestResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKHitTestResult.h; sourceTree = "<group>"; }; >@@ -4424,8 +4424,8 @@ > E133FD891423DD7F00FC7BFB /* WebKit.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = WebKit.icns; path = Resources/WebKit.icns; sourceTree = "<group>"; }; > E14A954716E016A40068DE82 /* NetworkProcessPlatformStrategies.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkProcessPlatformStrategies.cpp; sourceTree = "<group>"; }; > E14A954816E016A40068DE82 /* NetworkProcessPlatformStrategies.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkProcessPlatformStrategies.h; sourceTree = "<group>"; }; >- E1513C64166EABB200149FCB /* ChildProcessProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ChildProcessProxy.cpp; sourceTree = "<group>"; }; >- E1513C65166EABB200149FCB /* ChildProcessProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChildProcessProxy.h; sourceTree = "<group>"; }; >+ E1513C64166EABB200149FCB /* AuxiliaryProcessProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuxiliaryProcessProxy.cpp; sourceTree = "<group>"; }; >+ E1513C65166EABB200149FCB /* AuxiliaryProcessProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuxiliaryProcessProxy.h; sourceTree = "<group>"; }; > E1525517170109FB003D7ADB /* NetworkResourceLoader.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = NetworkResourceLoader.messages.in; sourceTree = "<group>"; }; > E152551817011819003D7ADB /* NetworkResourceLoaderMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkResourceLoaderMessageReceiver.cpp; path = DerivedSources/WebKit2/NetworkResourceLoaderMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; > E152551917011819003D7ADB /* NetworkResourceLoaderMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkResourceLoaderMessages.h; path = DerivedSources/WebKit2/NetworkResourceLoaderMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; >@@ -5014,16 +5014,16 @@ > BC329D9E16ACD47800316DE2 /* APIWebArchiveResource.mm */, > 515E7725183DD6F60007203F /* AsyncRequest.cpp */, > 515E7726183DD6F60007203F /* AsyncRequest.h */, >+ 1A2D956E12848564001EB962 /* AuxiliaryProcess.cpp */, >+ 1A2D956D12848564001EB962 /* AuxiliaryProcess.h */, >+ 5164C0941B05B757004F102A /* AuxiliaryProcess.messages.in */, >+ 290F4271172A0C7400939FF0 /* AuxiliaryProcessSupplement.h */, > E164A2EF191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.cpp */, > E164A2F0191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.h */, > 4F601430155C5A32001FBDE0 /* BlockingResponseMap.h */, > BCF18637167D071E00A1A85A /* CacheModel.cpp */, > BC3065F91259344E00E71278 /* CacheModel.h */, > 9BC59D6C1EFCCCB6001E8D09 /* CallbackID.h */, >- 1A2D956E12848564001EB962 /* ChildProcess.cpp */, >- 1A2D956D12848564001EB962 /* ChildProcess.h */, >- 5164C0941B05B757004F102A /* ChildProcess.messages.in */, >- 290F4271172A0C7400939FF0 /* ChildProcessSupplement.h */, > 5106D7BF18BDBE73000AB166 /* ContextMenuContextData.cpp */, > 5106D7C018BDBE73000AB166 /* ContextMenuContextData.h */, > 99F642D21FABE378009621E9 /* CoordinateSystem.h */, >@@ -5315,10 +5315,10 @@ > 51C0C9731DDD74F00032CAD3 /* IconLoadingDelegate.mm */, > 7A821F4B1E2F664800604577 /* LegacyCustomProtocolManagerClient.h */, > 7A821F4D1E2F679E00604577 /* LegacyCustomProtocolManagerClient.mm */, >- 411286EF21C8A90C003A8550 /* MediaCaptureUtilities.h */, >- 411286F021C8A90D003A8550 /* MediaCaptureUtilities.mm */, > 57900B3E21F8F9B8008317DE /* LoadOptimizer.h */, > 57900B3F21F8F9B8008317DE /* LoadOptimizer.mm */, >+ 411286EF21C8A90C003A8550 /* MediaCaptureUtilities.h */, >+ 411286F021C8A90D003A8550 /* MediaCaptureUtilities.mm */, > 1ABC3DF41899E437004F0626 /* NavigationState.h */, > 1ABC3DF31899E437004F0626 /* NavigationState.mm */, > 5C6CE6D31F59EA350007C6CB /* PageClientImplCocoa.h */, >@@ -5785,7 +5785,7 @@ > 2DA944961884E4DA00ED86DB /* ios */ = { > isa = PBXGroup; > children = ( >- A7E93CEB192531AA00A1DC48 /* ChildProcessIOS.mm */, >+ A7E93CEB192531AA00A1DC48 /* AuxiliaryProcessIOS.mm */, > 2DA6731920C754B1003CB401 /* DynamicViewportSizeUpdate.h */, > 2DA9449D1884E4F000ED86DB /* GestureTypes.h */, > C5BCE5DA1C50761D00CDE3FA /* InteractionInformationAtPosition.h */, >@@ -6220,7 +6220,7 @@ > 378E1A3B181ED6FF0031007A /* APIObject.mm */, > A175C44921AA3170000037D0 /* ArgumentCodersCocoa.h */, > A175C44B21AA331B000037D0 /* ArgumentCodersCocoa.mm */, >- 1A698F171E4910220064E881 /* ChildProcessCocoa.mm */, >+ 1A698F171E4910220064E881 /* AuxiliaryProcessCocoa.mm */, > 37BEC4DF19491486008B4286 /* CompletionHandlerCallChecker.h */, > 37BEC4DE19491486008B4286 /* CompletionHandlerCallChecker.mm */, > C55F916C1C595E440029E92D /* DataDetectionResult.h */, >@@ -7337,10 +7337,10 @@ > 1A53C2A31A325691004E8C70 /* WebsiteData */, > 1A44B95816B73F8C00B7BBD8 /* WebStorage */, > 7CD102D91866770600ED429D /* AutoCorrectionCallback.h */, >+ E1513C64166EABB200149FCB /* AuxiliaryProcessProxy.cpp */, >+ E1513C65166EABB200149FCB /* AuxiliaryProcessProxy.h */, > 46A2B6061E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.cpp */, > 46A2B6071E5675A200C3DEDA /* BackgroundProcessResponsivenessTimer.h */, >- E1513C64166EABB200149FCB /* ChildProcessProxy.cpp */, >- E1513C65166EABB200149FCB /* ChildProcessProxy.h */, > 07297F9C1C1711EA003F0735 /* DeviceIdHashSaltStorage.cpp */, > 07297F9D1C17BBEA223F0735 /* DeviceIdHashSaltStorage.h */, > BC2652121182608100243E12 /* DrawingAreaProxy.cpp */, >@@ -7786,7 +7786,7 @@ > E179FD9E134D38250015B883 /* ArgumentCodersMac.mm */, > E1A31731134CEA6C007C9A4F /* AttributedString.h */, > E1A31734134CEA80007C9A4F /* AttributedString.mm */, >- 9F54F88E16488E87007DF81A /* ChildProcessMac.mm */, >+ 9F54F88E16488E87007DF81A /* AuxiliaryProcessMac.mm */, > CE11AD511CBC482F00681EE5 /* CodeSigning.h */, > CE11AD4F1CBC47F800681EE5 /* CodeSigning.mm */, > 1A2A4AFE158693920090C9E9 /* ColorSpaceData.h */, >@@ -8379,9 +8379,9 @@ > 99249AD41F1F1E3300B62FBB /* AutomationFrontendDispatchers.h */, > 9955A6F21C79866400EB6A93 /* AutomationProtocolObjects.cpp */, > 9955A6F31C79866400EB6A93 /* AutomationProtocolObjects.h */, >+ 51FAEC361B0657310009C4E7 /* AuxiliaryProcessMessageReceiver.cpp */, >+ 51FAEC371B0657310009C4E7 /* AuxiliaryProcessMessages.h */, > 517CF0E1163A486C00C2950F /* CacheStorageEngineConnectionMessageReceiver.cpp */, >- 51FAEC361B0657310009C4E7 /* ChildProcessMessageReceiver.cpp */, >- 51FAEC371B0657310009C4E7 /* ChildProcessMessages.h */, > E17AE2C216B9C63A001C42F1 /* com.apple.WebKit.NetworkProcess.sb */, > 7A1506721DD56298001F4B58 /* com.apple.WebKit.plugin-common.sb */, > E115C715190F8A2500ECC516 /* com.apple.WebKit.Storage.sb */, >@@ -9000,6 +9000,10 @@ > 99249AD61F1F1E5F00B62FBB /* AutomationFrontendDispatchers.h in Headers */, > 9955A6F71C7986E500EB6A93 /* AutomationProtocolObjects.h in Headers */, > 990D28BB1C6539D300986977 /* AutomationSessionClient.h in Headers */, >+ 1A2D956F12848564001EB962 /* AuxiliaryProcess.h in Headers */, >+ 51FAEC3A1B0657630009C4E7 /* AuxiliaryProcessMessages.h in Headers */, >+ E1513C67166EABB200149FCB /* AuxiliaryProcessProxy.h in Headers */, >+ 290F4272172A0C7400939FF0 /* AuxiliaryProcessSupplement.h in Headers */, > CDA041F41ACE2105004A13EC /* BackBoardServicesSPI.h in Headers */, > 46A2B6091E5676A600C3DEDA /* BackgroundProcessResponsivenessTimer.h in Headers */, > E164A2F2191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.h in Headers */, >@@ -9011,10 +9015,6 @@ > 41FABD2A1F4DE001006A6C97 /* CacheStorageEngineCache.h in Headers */, > 41897EDA1F415D8A0016FA42 /* CacheStorageEngineConnection.h in Headers */, > 1AA2E51D12E4C05E00BC4966 /* CGUtilities.h in Headers */, >- 1A2D956F12848564001EB962 /* ChildProcess.h in Headers */, >- 51FAEC3A1B0657630009C4E7 /* ChildProcessMessages.h in Headers */, >- E1513C67166EABB200149FCB /* ChildProcessProxy.h in Headers */, >- 290F4272172A0C7400939FF0 /* ChildProcessSupplement.h in Headers */, > 57B4B46020B504AC00D4AD79 /* ClientCertificateAuthenticationXPCConstants.h in Headers */, > CE11AD521CBC482F00681EE5 /* CodeSigning.h in Headers */, > 37BEC4E119491486008B4286 /* CompletionHandlerCallChecker.h in Headers */, >@@ -9118,6 +9118,7 @@ > 413075AD1DE85F580039EC69 /* LibWebRTCSocket.h in Headers */, > 41DC459C1E3DBB2800B11F51 /* LibWebRTCSocketClient.h in Headers */, > 413075B21DE85F580039EC69 /* LibWebRTCSocketFactory.h in Headers */, >+ 57900B4021F8F9B8008317DE /* LoadOptimizer.h in Headers */, > 2D1087611D2C573E00B85F82 /* LoadParameters.h in Headers */, > 578DC2982155A0020074E815 /* LocalAuthenticationSoftLink.h in Headers */, > 57DCEDAC214C60270016B847 /* LocalAuthenticator.h in Headers */, >@@ -9920,7 +9921,6 @@ > 7C89D2A41A678875003A5FDE /* WKUserScriptRef.h in Headers */, > BC8699B5116AADAA002A925B /* WKView.h in Headers */, > BC8699B7116AADAA002A925B /* WKViewInternal.h in Headers */, >- 57900B4021F8F9B8008317DE /* LoadOptimizer.h in Headers */, > 2D28A4971AF965A100F190C9 /* WKViewLayoutStrategy.h in Headers */, > BFA6179F12F0B99D0033E0CA /* WKViewPrivate.h in Headers */, > C5E1AFE916B20B75006CC1F2 /* WKWebArchive.h in Headers */, >@@ -10777,10 +10777,10 @@ > 9955A6F41C7986DC00EB6A93 /* AutomationBackendDispatchers.cpp in Sources */, > 99249AD51F1F1E5600B62FBB /* AutomationFrontendDispatchers.cpp in Sources */, > 9955A6F61C7986E300EB6A93 /* AutomationProtocolObjects.cpp in Sources */, >+ 2D92A786212B6AB100F493FD /* AuxiliaryProcess.cpp in Sources */, >+ 51FAEC3B1B0657680009C4E7 /* AuxiliaryProcessMessageReceiver.cpp in Sources */, > 2D92A785212B6AB100F493FD /* BlobDataFileReferenceWithSandboxExtension.cpp in Sources */, > 517CF0E3163A486C00C2950F /* CacheStorageEngineConnectionMessageReceiver.cpp in Sources */, >- 2D92A786212B6AB100F493FD /* ChildProcess.cpp in Sources */, >- 51FAEC3B1B0657680009C4E7 /* ChildProcessMessageReceiver.cpp in Sources */, > 2D92A77D212B6A7100F493FD /* Connection.cpp in Sources */, > 2D92A77E212B6A7100F493FD /* DataReference.cpp in Sources */, > 2D92A77F212B6A7100F493FD /* Decoder.cpp in Sources */, >Index: Source/WebKit/WebProcess/WebProcess.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.cpp (revision 240589) >+++ Source/WebKit/WebProcess/WebProcess.cpp (working copy) >@@ -30,7 +30,7 @@ > #include "APIPageGroupHandle.h" > #include "APIPageHandle.h" > #include "AuthenticationManager.h" >-#include "ChildProcessMessages.h" >+#include "AuxiliaryProcessMessages.h" > #include "DrawingArea.h" > #include "EventDispatcher.h" > #include "InjectedBundle.h" >@@ -223,7 +223,7 @@ WebProcess::~WebProcess() > { > } > >-void WebProcess::initializeProcess(const ChildProcessInitializationParameters& parameters) >+void WebProcess::initializeProcess(const AuxiliaryProcessInitializationParameters& parameters) > { > WTF::setProcessPrivileges({ }); > >@@ -234,10 +234,10 @@ void WebProcess::initializeProcess(const > > void WebProcess::initializeConnection(IPC::Connection* connection) > { >- ChildProcess::initializeConnection(connection); >+ AuxiliaryProcess::initializeConnection(connection); > > // We call _exit() directly from the background queue in case the main thread is unresponsive >- // and ChildProcess::didClose() does not get called. >+ // and AuxiliaryProcess::didClose() does not get called. > connection->setDidCloseOnConnectionWorkQueueCallback(callExit); > > #if !PLATFORM(GTK) && !PLATFORM(WPE) >@@ -661,7 +661,7 @@ void WebProcess::terminate() > > platformTerminate(); > >- ChildProcess::terminate(); >+ AuxiliaryProcess::terminate(); > } > > void WebProcess::didReceiveSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder) >@@ -682,8 +682,8 @@ void WebProcess::didReceiveMessage(IPC:: > return; > } > >- if (decoder.messageReceiverName() == Messages::ChildProcess::messageReceiverName()) { >- ChildProcess::didReceiveMessage(connection, decoder); >+ if (decoder.messageReceiverName() == Messages::AuxiliaryProcess::messageReceiverName()) { >+ AuxiliaryProcess::didReceiveMessage(connection, decoder); > return; > } > >@@ -1328,15 +1328,15 @@ void WebProcess::setHiddenPageDOMTimerTh > } > > #if !PLATFORM(COCOA) >-void WebProcess::initializeProcessName(const ChildProcessInitializationParameters&) >+void WebProcess::initializeProcessName(const AuxiliaryProcessInitializationParameters&) > { > } > >-void WebProcess::initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&) >+void WebProcess::initializeSandbox(const AuxiliaryProcessInitializationParameters&, SandboxInitializationParameters&) > { > } > >-void WebProcess::platformInitializeProcess(const ChildProcessInitializationParameters&) >+void WebProcess::platformInitializeProcess(const AuxiliaryProcessInitializationParameters&) > { > } > >Index: Source/WebKit/WebProcess/WebProcess.h >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.h (revision 240589) >+++ Source/WebKit/WebProcess/WebProcess.h (working copy) >@@ -25,8 +25,8 @@ > > #pragma once > >+#include "AuxiliaryProcess.h" > #include "CacheModel.h" >-#include "ChildProcess.h" > #include "PluginProcessConnectionManager.h" > #include "ResourceCachesToClear.h" > #include "SandboxExtension.h" >@@ -105,7 +105,7 @@ struct WebProcessCreationParameters; > struct WebsiteData; > struct WebsiteDataStoreParameters; > >-class WebProcess : public ChildProcess { >+class WebProcess : public AuxiliaryProcess { > public: > static WebProcess& singleton(); > static constexpr ProcessType processType = ProcessType::WebContent; >@@ -354,10 +354,10 @@ private: > enum class CPUMonitorUpdateReason { LimitHasChanged, VisibilityHasChanged }; > void updateCPUMonitorState(CPUMonitorUpdateReason); > >- // ChildProcess >- void initializeProcess(const ChildProcessInitializationParameters&) override; >- void initializeProcessName(const ChildProcessInitializationParameters&) override; >- void initializeSandbox(const ChildProcessInitializationParameters&, SandboxInitializationParameters&) override; >+ // AuxiliaryProcess >+ void initializeProcess(const AuxiliaryProcessInitializationParameters&) override; >+ void initializeProcessName(const AuxiliaryProcessInitializationParameters&) override; >+ void initializeSandbox(const AuxiliaryProcessInitializationParameters&, SandboxInitializationParameters&) override; > void initializeConnection(IPC::Connection*) override; > bool shouldTerminate() override; > void terminate() override; >@@ -373,7 +373,7 @@ private: > void resetMockMediaDevices(); > #endif > >- void platformInitializeProcess(const ChildProcessInitializationParameters&); >+ void platformInitializeProcess(const AuxiliaryProcessInitializationParameters&); > > // IPC::Connection::Client > friend class WebConnectionToUIProcess; >Index: Source/WebKit/WebProcess/WebProcessSupplement.h >=================================================================== >--- Source/WebKit/WebProcess/WebProcessSupplement.h (revision 240589) >+++ Source/WebKit/WebProcess/WebProcessSupplement.h (working copy) >@@ -23,16 +23,15 @@ > * THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef WebProcessSupplement_h >-#define WebProcessSupplement_h >+#pragma once > >-#include "ChildProcessSupplement.h" >+#include "AuxiliaryProcessSupplement.h" > > namespace WebKit { > > struct WebProcessCreationParameters; > >-class WebProcessSupplement : public ChildProcessSupplement { >+class WebProcessSupplement : public AuxiliaryProcessSupplement { > public: > virtual void initialize(const WebProcessCreationParameters&) > { >@@ -40,5 +39,3 @@ public: > }; > > } // namespace WebKit >- >-#endif // WebProcessSupplement_h >Index: Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm >=================================================================== >--- Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (revision 240589) >+++ Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (working copy) >@@ -208,7 +208,7 @@ void WebProcess::platformInitializeWebPr > #endif > } > >-void WebProcess::initializeProcessName(const ChildProcessInitializationParameters&) >+void WebProcess::initializeProcessName(const AuxiliaryProcessInitializationParameters&) > { > #if PLATFORM(MAC) > updateProcessName(); >@@ -348,7 +348,7 @@ void WebProcess::registerWithStateDumper > } > #endif > >-void WebProcess::platformInitializeProcess(const ChildProcessInitializationParameters& parameters) >+void WebProcess::platformInitializeProcess(const AuxiliaryProcessInitializationParameters& parameters) > { > #if PLATFORM(MAC) > #if ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) >@@ -402,9 +402,9 @@ void WebProcess::platformInitializeProce > void WebProcess::stopRunLoop() > { > #if PLATFORM(MAC) && ENABLE(WEBPROCESS_NSRUNLOOP) >- ChildProcess::stopNSRunLoop(); >+ AuxiliaryProcess::stopNSRunLoop(); > #else >- ChildProcess::stopNSAppRunLoop(); >+ AuxiliaryProcess::stopNSAppRunLoop(); > #endif > } > #endif >@@ -429,7 +429,7 @@ RetainPtr<CFDataRef> WebProcess::sourceA > #endif > } > >-void WebProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >+void WebProcess::initializeSandbox(const AuxiliaryProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) > { > #if ENABLE(WEB_PROCESS_SANDBOX) > #if ENABLE(MANUAL_SANDBOXING) >@@ -444,7 +444,7 @@ void WebProcess::initializeSandbox(const > #else > sandboxParameters.setOverrideSandboxProfilePath([webKit2Bundle pathForResource:@"com.apple.WebProcess" ofType:@"sb"]); > #endif >- ChildProcess::initializeSandbox(parameters, sandboxParameters); >+ AuxiliaryProcess::initializeSandbox(parameters, sandboxParameters); > #endif > #else > UNUSED_PARAM(parameters); >Index: Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp >=================================================================== >--- Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp (revision 240589) >+++ Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp (working copy) >@@ -27,7 +27,7 @@ > #include "config.h" > #include "WebProcessMainUnix.h" > >-#include "ChildProcessMain.h" >+#include "AuxiliaryProcessMain.h" > #include "WebProcess.h" > #include <WebCore/SoupNetworkSession.h> > #include <gtk/gtk.h> >@@ -41,7 +41,7 @@ > namespace WebKit { > using namespace WebCore; > >-class WebProcessMain final: public ChildProcessMainBase { >+class WebProcessMain final: public AuxiliaryProcessMainBase { > public: > bool platformInitialize() override > { >@@ -64,7 +64,7 @@ public: > > int WebProcessMainUnix(int argc, char** argv) > { >- return ChildProcessMain<WebProcess, WebProcessMain>(argc, argv); >+ return AuxiliaryProcessMain<WebProcess, WebProcessMain>(argc, argv); > } > > } // namespace WebKit >Index: Source/WebKit/WebProcess/win/WebProcessMainWin.cpp >=================================================================== >--- Source/WebKit/WebProcess/win/WebProcessMainWin.cpp (revision 240589) >+++ Source/WebKit/WebProcess/win/WebProcessMainWin.cpp (working copy) >@@ -26,13 +26,13 @@ > #include "config.h" > #include "WebProcessMainWin.h" > >-#include "ChildProcessMain.h" >+#include "AuxiliaryProcessMain.h" > #include "WebProcess.h" > > namespace WebKit { > using namespace WebCore; > >-class WebProcessMain final : public ChildProcessMainBase { >+class WebProcessMain final : public AuxiliaryProcessMainBase { > public: > bool platformInitialize() override > { >@@ -42,7 +42,7 @@ public: > > int WebProcessMainWin(int argc, char** argv) > { >- return ChildProcessMain<WebProcess, WebProcessMain>(argc, argv); >+ return AuxiliaryProcessMain<WebProcess, WebProcessMain>(argc, argv); > } > > } // namespace WebKit >Index: Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp >=================================================================== >--- Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp (revision 240589) >+++ Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp (working copy) >@@ -27,7 +27,7 @@ > #include "config.h" > #include "WebProcessMainUnix.h" > >-#include "ChildProcessMain.h" >+#include "AuxiliaryProcessMain.h" > #include "WebProcess.h" > #include <WebCore/PlatformDisplayLibWPE.h> > #include <glib.h> >@@ -38,7 +38,7 @@ > namespace WebKit { > using namespace WebCore; > >-class WebProcessMain final : public ChildProcessMainBase { >+class WebProcessMain final : public AuxiliaryProcessMainBase { > public: > bool platformInitialize() override > { >@@ -60,7 +60,7 @@ public: > if (argc < 5) > return false; > >- if (!ChildProcessMainBase::parseCommandLine(argc, argv)) >+ if (!AuxiliaryProcessMainBase::parseCommandLine(argc, argv)) > return false; > > #if defined(WPE_BACKEND_CHECK_VERSION) && WPE_BACKEND_CHECK_VERSION(0, 2, 0) >@@ -79,7 +79,7 @@ public: > > int WebProcessMainUnix(int argc, char** argv) > { >- return ChildProcessMain<WebProcess, WebProcessMain>(argc, argv); >+ return AuxiliaryProcessMain<WebProcess, WebProcessMain>(argc, argv); > } > > } // namespace WebKit
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:
aestes
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193943
: 360408