WebKit Bugzilla
Attachment 357759 Details for
Bug 191298
: Payment process stub with feature flag
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-191298-20181219170017.patch (text/plain), 133.96 KB, created by
Zamiul Haque
on 2018-12-19 17:00:17 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Zamiul Haque
Created:
2018-12-19 17:00:17 PST
Size:
133.96 KB
patch
obsolete
>Subversion Revision: 239387 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 061d90bf7ea8e8524f26e5d24178db7123fed7be..3443bb0989ea1fca78387f0490b794d3190d16ab 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,12 @@ >+2018-11-27 Zamiul Haque <zhaque@apple.com> >+ >+ Payment process stub with feature flag >+ https://bugs.webkit.org/show_bug.cgi?id=191298 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Configurations/FeatureDefines.xcconfig: >+ > 2018-12-19 Caio Lima <ticaiolima@gmail.com> > > [BigInt] We should enable CSE into arithmetic operations that speculate BigIntUse >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index dd94ab16122226fd52f58b0c90625d45e6fd1a0d..8a4d6176cc21a0e1630e352fa03556247b0d2d10 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,13 @@ >+2018-11-27 Zamiul Haque <zhaque@apple.com> >+ >+ Payment process stub with feature flag >+ https://bugs.webkit.org/show_bug.cgi?id=191298 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Configurations/FeatureDefines.xcconfig: >+ * en.lproj/Localizable.strings: >+ > 2018-12-19 Jer Noble <jer.noble@apple.com> > > Force synchronous decode in WebCoreDecompressionSession::decodeSampleSync() >diff --git a/Source/WebCore/PAL/ChangeLog b/Source/WebCore/PAL/ChangeLog >index ca7b06235f926b985ad14bb7e313b8586562c89a..8234ca6707ce0bcfdae52006e41edf586d402e22 100644 >--- a/Source/WebCore/PAL/ChangeLog >+++ b/Source/WebCore/PAL/ChangeLog >@@ -1,3 +1,12 @@ >+2018-11-27 Zamiul Haque <zhaque@apple.com> >+ >+ Payment process stub with feature flag >+ https://bugs.webkit.org/show_bug.cgi?id=191298 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Configurations/FeatureDefines.xcconfig: >+ > 2018-12-17 Saam barati <sbarati@apple.com> > > Enable HTTP and HTTPS proxies on iOS and make it a property of the NSURLSession >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index e116f47f9961f4aa606d5910ca34e40df60df6be..2d8f5278ee9f236460a0ce3ae83b6c3a1ba67008 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,179 @@ >+2018-11-27 Zamiul Haque <zhaque@apple.com> >+ >+ Payment process stub with feature flag >+ https://bugs.webkit.org/show_bug.cgi?id=191298 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * CMakeLists.txt: >+ * Configurations/BaseTarget.xcconfig: >+ * Configurations/FeatureDefines.xcconfig: >+ * Configurations/PaymentService.xcconfig: Added. >+ * DerivedSources.make: >+ * PaymentProcess/EntryPoint/ios/XPCService/PaymentService/Info-iOS.plist: Added. >+ * PaymentProcess/EntryPoint/ios/XPCService/PaymentServiceEntryPoint.mm: Copied from Source/WebKit/UIProcess/WebContextSupplement.h. >+ (WebKit::PaymentServiceInitializerDelegate::PaymentServiceInitializerDelegate): >+ (PaymentServiceInitializer): >+ * PaymentProcess/PaymentProcess.cpp: Copied from Source/WebKit/UIProcess/WebContextClient.cpp. >+ (WebKit::PaymentProcess::singleton): >+ (WebKit::PaymentProcess::PaymentProcess): >+ (WebKit::PaymentProcess::~PaymentProcess): >+ (WebKit::PaymentProcess::initializeConnection): >+ (WebKit::PaymentProcess::shouldTerminate): >+ (WebKit::PaymentProcess::didReceiveMessage): >+ (WebKit::PaymentProcess::createPaymentToWebProcessConnection): >+ * PaymentProcess/PaymentProcess.h: Copied from Source/WebKit/UIProcess/WebContextSupplement.h. >+ * PaymentProcess/PaymentProcess.messages.in: Added. >+ * PaymentProcess/PaymentToWebProcessConnection.cpp: Added. >+ (WebKit::PaymentToWebProcessConnection::create): >+ (WebKit::PaymentToWebProcessConnection::PaymentToWebProcessConnection): >+ (WebKit::PaymentToWebProcessConnection::~PaymentToWebProcessConnection): >+ (WebKit::PaymentToWebProcessConnection::didReceiveMessage): >+ (WebKit::PaymentToWebProcessConnection::didReceiveSyncMessage): >+ (WebKit::PaymentToWebProcessConnection::didClose): >+ (WebKit::PaymentToWebProcessConnection::didReceiveInvalidMessage): >+ * PaymentProcess/PaymentToWebProcessConnection.h: Added. >+ (WebKit::PaymentToWebProcessConnection::connection): >+ * PaymentProcess/PaymentToWebProcessConnection.messages.in: Added. >+ * PaymentProcess/ios/PaymentProcessIOS.mm: Copied from Source/WebKit/UIProcess/WebContextClient.cpp. >+ (WebKit::PaymentProcess::initializeProcess): >+ (WebKit::PaymentProcess::initializeProcessName): >+ (WebKit::PaymentProcess::initializeSandbox): >+ * Resources/SandboxProfiles/ios/com.apple.WebKit.Payments.sb: Added. >+ * Shared/ChildProcess.h: >+ * Shared/Payment/PaymentProcessCreationParameters.cpp: Copied from Source/WebKit/UIProcess/WebContextClient.cpp. >+ (WebKit::PaymentProcessCreationParameters::PaymentProcessCreationParameters): >+ (WebKit::PaymentProcessCreationParameters::encode const): >+ (WebKit::PaymentProcessCreationParameters::decode): >+ * Shared/Payment/PaymentProcessCreationParameters.h: Copied from Source/WebKit/Shared/ProcessExecutablePath.h. >+ * Shared/ProcessExecutablePath.h: >+ * Sources.txt: >+ * SourcesCocoa.txt: >+ * UIProcess/API/C/WKContext.cpp: >+ (WKContextTerminatePaymentProcess): >+ (WKContextGetPaymentProcessIdentifier): >+ * UIProcess/API/C/WKContext.h: >+ * UIProcess/API/C/WKContextPrivate.h: >+ * UIProcess/API/Cocoa/WKProcessPool.mm: >+ (-[WKProcessPool _terminatePaymentProcess]): >+ (-[WKProcessPool _paymentProcessIdentifier]): >+ * UIProcess/API/Cocoa/WKProcessPoolPrivate.h: >+ * UIProcess/Launcher/ProcessLauncher.h: >+ * UIProcess/Launcher/mac/ProcessLauncherMac.mm: >+ (WebKit::serviceName): >+ * UIProcess/Payments/PaymentProcessProxy.cpp: Added. >+ (WebKit::PaymentProcessProxy::PaymentProcessProxy): >+ (WebKit::PaymentProcessProxy::~PaymentProcessProxy): >+ (WebKit::PaymentProcessProxy::terminateForTesting): >+ (WebKit::PaymentProcessProxy::getPaymentProcessConnection): >+ (WebKit::PaymentProcessProxy::getLaunchOptions): >+ (WebKit::PaymentProcessProxy::processWillShutDown): >+ (WebKit::PaymentProcessProxy::didReceiveMessage): >+ (WebKit::PaymentProcessProxy::didClose): >+ (WebKit::PaymentProcessProxy::didReceiveInvalidMessage): >+ (WebKit::didReceivePaymentProcessProxyMessage): >+ (WebKit::PaymentProcessProxy::didCreatePaymentToWebProcessConnection): >+ (WebKit::PaymentProcessProxy::didFinishLaunching): >+ * UIProcess/Payments/PaymentProcessProxy.h: Added. >+ * UIProcess/Payments/PaymentProcessProxy.messages.in: Added. >+ * UIProcess/WebContextClient.cpp: >+ (WebKit::WebContextClient::paymentProcessDidCrash): >+ * UIProcess/WebContextClient.h: >+ * UIProcess/WebContextSupplement.h: >+ (WebKit::WebContextSupplement::processDidClose): >+ * UIProcess/WebInspectorProxy.cpp: >+ (WebKit::WebInspectorProxy::platformShowCertificate): >+ * UIProcess/WebProcessPool.cpp: >+ (WebKit::WebProcessPool::sendMemoryPressureEvent): >+ (WebKit::WebProcessPool::ensurePaymentProcess): >+ (WebKit::WebProcessPool::getPaymentProcessConnection): >+ (WebKit::WebProcessPool::paymentProcessCrashed): >+ (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled): >+ (WebKit::WebProcessPool::paymentProcessIdentifier): >+ (WebKit::WebProcessPool::terminatePaymentProcessForTesting): >+ * UIProcess/WebProcessPool.h: >+ (WebKit::WebProcessPool::sendToPaymentProcess): >+ (WebKit::WebProcessPool::sendToPaymentProcessRelaunchingIfNecessary): >+ * UIProcess/WebProcessProxy.cpp: >+ (WebKit::WebProcessProxy::getPaymentProcessConnection): >+ * UIProcess/WebProcessProxy.h: >+ * UIProcess/WebProcessProxy.messages.in: >+ * UIProcess/WebsiteData/WebsiteDataStore.cpp: >+ (WebKit::WebsiteDataStore::~WebsiteDataStore): >+ (WebKit::WebsiteDataStore::destroyPaymentProcessSession): >+ (WebKit::WebsiteDataStore::paymentProcessParameters): >+ * UIProcess/WebsiteData/WebsiteDataStore.h: >+ * UIProcess/wpe/WebInspectorProxyWPE.cpp: >+ (WebKit::WebInspectorProxy::platformShowCertificate): >+ * WebKit.xcodeproj/project.pbxproj: >+ * WebProcess/Payments/WebToPaymentProcessConnection.cpp: Added. >+ (WebKit::WebToPaymentProcessConnection::WebToPaymentProcessConnection): >+ (WebKit::WebToPaymentProcessConnection::~WebToPaymentProcessConnection): >+ (WebKit::WebToPaymentProcessConnection::didReceiveMessage): >+ (WebKit::WebToPaymentProcessConnection::didReceiveSyncMessage): >+ (WebKit::WebToPaymentProcessConnection::didClose): >+ (WebKit::WebToPaymentProcessConnection::didReceiveInvalidMessage): >+ * WebProcess/Payments/WebToPaymentProcessConnection.h: Added. >+ (WebKit::WebToPaymentProcessConnection::create): >+ (WebKit::WebToPaymentProcessConnection::connection): >+ * WebProcess/WebPage/WebPageInspectorTargetController.cpp: >+ (WebKit::WebPageInspectorTargetController::connectInspector): >+ (WebKit::WebPageInspectorTargetController::disconnectInspector): >+ (WebKit::WebPageInspectorTargetController::sendMessageToTargetBackend): >+ * WebProcess/WebProcess.cpp: >+ (WebKit::WebProcess::webToPaymentProcessConnectionClosed): >+ (WebKit::WebProcess::ensureWebToPaymentProcessConnection): >+ (WebKit::WebProcess::setEnhancedAccessibility): Deleted. >+ (WebKit::WebProcess::startMemorySampler): Deleted. >+ (WebKit::WebProcess::stopMemorySampler): Deleted. >+ (WebKit::WebProcess::setTextCheckerState): Deleted. >+ (WebKit::WebProcess::releasePageCache): Deleted. >+ (WebKit::WebProcess::fetchWebsiteData): Deleted. >+ (WebKit::WebProcess::deleteWebsiteData): Deleted. >+ (WebKit::WebProcess::deleteWebsiteDataForOrigins): Deleted. >+ (WebKit::WebProcess::setHiddenPageDOMTimerThrottlingIncreaseLimit): Deleted. >+ (WebKit::WebProcess::initializeProcessName): Deleted. >+ (WebKit::WebProcess::initializeSandbox): Deleted. >+ (WebKit::WebProcess::platformInitializeProcess): Deleted. >+ (WebKit::WebProcess::updateActivePages): Deleted. >+ (WebKit::WebProcess::getActivePagesOriginsForTesting): Deleted. >+ (WebKit::WebProcess::updateCPULimit): Deleted. >+ (WebKit::WebProcess::updateCPUMonitorState): Deleted. >+ (WebKit::WebProcess::pageActivityStateDidChange): Deleted. >+ (WebKit::WebProcess::resetAllGeolocationPermissions): Deleted. >+ (WebKit::WebProcess::actualPrepareToSuspend): Deleted. >+ (WebKit::WebProcess::processWillSuspendImminently): Deleted. >+ (WebKit::WebProcess::prepareToSuspend): Deleted. >+ (WebKit::WebProcess::cancelPrepareToSuspend): Deleted. >+ (WebKit::WebProcess::markAllLayersVolatile): Deleted. >+ (WebKit::WebProcess::cancelMarkAllLayersVolatile): Deleted. >+ (WebKit::WebProcess::freezeAllLayerTrees): Deleted. >+ (WebKit::WebProcess::unfreezeAllLayerTrees): Deleted. >+ (WebKit::WebProcess::processDidResume): Deleted. >+ (WebKit::WebProcess::sendPrewarmInformation): Deleted. >+ (WebKit::WebProcess::pageDidEnterWindow): Deleted. >+ (WebKit::WebProcess::pageWillLeaveWindow): Deleted. >+ (WebKit::WebProcess::nonVisibleProcessCleanupTimerFired): Deleted. >+ (WebKit::WebProcess::setResourceLoadStatisticsEnabled): Deleted. >+ (WebKit::WebProcess::clearResourceLoadStatistics): Deleted. >+ (WebKit::WebProcess::transformHandlesToObjects): Deleted. >+ (WebKit::WebProcess::transformObjectsToHandles): Deleted. >+ (WebKit::WebProcess::setMemoryCacheDisabled): Deleted. >+ (WebKit::WebProcess::setEnabledServices): Deleted. >+ (WebKit::WebProcess::ensureAutomationSessionProxy): Deleted. >+ (WebKit::WebProcess::destroyAutomationSessionProxy): Deleted. >+ (WebKit::WebProcess::prefetchDNS): Deleted. >+ (WebKit::WebProcess::hasVisibleWebPage const): Deleted. >+ (WebKit::WebProcess::libWebRTCNetwork): Deleted. >+ (WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess): Deleted. >+ (WebKit::WebProcess::registerServiceWorkerClients): Deleted. >+ (WebKit::WebProcess::setScreenProperties): Deleted. >+ (WebKit::WebProcess::addMockMediaDevice): Deleted. >+ (WebKit::WebProcess::clearMockMediaDevices): Deleted. >+ (WebKit::WebProcess::removeMockMediaDevice): Deleted. >+ (WebKit::WebProcess::resetMockMediaDevices): Deleted. >+ * WebProcess/WebProcess.h: >+ > 2018-12-19 Megan Gardner <megan_gardner@apple.com> > > Allow clients to set the navigator platform >diff --git a/Source/WebKitLegacy/mac/ChangeLog b/Source/WebKitLegacy/mac/ChangeLog >index acb13344f5f116b698e706daac8c34cff8985465..0f1affe425df877f2e0dc8ec8ef750a9cbc051f5 100644 >--- a/Source/WebKitLegacy/mac/ChangeLog >+++ b/Source/WebKitLegacy/mac/ChangeLog >@@ -1,3 +1,12 @@ >+2018-11-27 Zamiul Haque <zhaque@apple.com> >+ >+ Payment process stub with feature flag >+ https://bugs.webkit.org/show_bug.cgi?id=191298 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Configurations/FeatureDefines.xcconfig: >+ > 2018-12-19 Megan Gardner <megan_gardner@apple.com> > > Allow clients to set the navigator platform >diff --git a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig b/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig >index 2e9a04d01bdd1421c4b457114bf89c3c784ef9c0..ad6b5f389e374afd7c050841107879efa82a7ae5 100644 >--- a/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig >+++ b/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig >@@ -292,6 +292,7 @@ ENABLE_NAVIGATOR_STANDALONE_cocoatouch = ENABLE_NAVIGATOR_STANDALONE; > ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(WK_PLATFORM_NAME)); > ENABLE_NOTIFICATIONS_macosx = ENABLE_NOTIFICATIONS; > >+ENABLE_PAYMENT_PROCESS = ENABLE_PAYMENT_PROCESS; > ENABLE_PAYMENT_REQUEST = ENABLE_PAYMENT_REQUEST; > > ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(WK_PLATFORM_NAME)); >diff --git a/Source/WebCore/Configurations/FeatureDefines.xcconfig b/Source/WebCore/Configurations/FeatureDefines.xcconfig >index 2e9a04d01bdd1421c4b457114bf89c3c784ef9c0..ad6b5f389e374afd7c050841107879efa82a7ae5 100644 >--- a/Source/WebCore/Configurations/FeatureDefines.xcconfig >+++ b/Source/WebCore/Configurations/FeatureDefines.xcconfig >@@ -292,6 +292,7 @@ ENABLE_NAVIGATOR_STANDALONE_cocoatouch = ENABLE_NAVIGATOR_STANDALONE; > ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(WK_PLATFORM_NAME)); > ENABLE_NOTIFICATIONS_macosx = ENABLE_NOTIFICATIONS; > >+ENABLE_PAYMENT_PROCESS = ENABLE_PAYMENT_PROCESS; > ENABLE_PAYMENT_REQUEST = ENABLE_PAYMENT_REQUEST; > > ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(WK_PLATFORM_NAME)); >diff --git a/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig b/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig >index 2e9a04d01bdd1421c4b457114bf89c3c784ef9c0..ad6b5f389e374afd7c050841107879efa82a7ae5 100644 >--- a/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig >+++ b/Source/WebCore/PAL/Configurations/FeatureDefines.xcconfig >@@ -292,6 +292,7 @@ ENABLE_NAVIGATOR_STANDALONE_cocoatouch = ENABLE_NAVIGATOR_STANDALONE; > ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(WK_PLATFORM_NAME)); > ENABLE_NOTIFICATIONS_macosx = ENABLE_NOTIFICATIONS; > >+ENABLE_PAYMENT_PROCESS = ENABLE_PAYMENT_PROCESS; > ENABLE_PAYMENT_REQUEST = ENABLE_PAYMENT_REQUEST; > > ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(WK_PLATFORM_NAME)); >diff --git a/Source/WebCore/en.lproj/Localizable.strings b/Source/WebCore/en.lproj/Localizable.strings >index 553e5620dfee6f9bdaf009bae0c2fcae2f2baa5d..7bdae93fdbf2305baaafb7d58435d4c7f3a136e3 100644 >--- a/Source/WebCore/en.lproj/Localizable.strings >+++ b/Source/WebCore/en.lproj/Localizable.strings >@@ -43,6 +43,9 @@ > /* Visible name of Service Worker process. The argument is the application name. */ > "%@ Service Worker (%@)" = "%@ Service Worker (%@)"; > >+/* visible name of the payment process. The argument is the application name. */ >+"%@ Payments" = "%@ Payments"; >+ > /* Visible name of the web process. The argument is the application name. */ > "%@ Web Content" = "%@ Web Content"; > >diff --git a/Source/WebKit/CMakeLists.txt b/Source/WebKit/CMakeLists.txt >index 6db1e9118a6994f945f38f1af2dfaca20b8c3d84..c62ffae1f3cfe8c4b9501d9535270ab7798053a1 100644 >--- a/Source/WebKit/CMakeLists.txt >+++ b/Source/WebKit/CMakeLists.txt >@@ -14,6 +14,7 @@ set(WebKit_INCLUDE_DIRECTORIES > "${WEBKIT_DIR}/NetworkProcess/cache" > "${WEBKIT_DIR}/NetworkProcess/watchos" > "${WEBKIT_DIR}/NetworkProcess/webrtc" >+ "${WEBKIT_DIR}/PaymentProcess" > "${WEBKIT_DIR}/Platform" > "${WEBKIT_DIR}/Platform/IPC" > "${WEBKIT_DIR}/PluginProcess" >@@ -26,6 +27,7 @@ set(WebKit_INCLUDE_DIRECTORIES > "${WEBKIT_DIR}/Shared/Databases/IndexedDB" > "${WEBKIT_DIR}/Shared/FileAPI" > "${WEBKIT_DIR}/Shared/Gamepad" >+ "${WEBKIT_DIR}/Shared/Payment" > "${WEBKIT_DIR}/Shared/Plugins" > "${WEBKIT_DIR}/Shared/Plugins/Netscape" > "${WEBKIT_DIR}/Shared/Plugins/Netscape/x11" >@@ -44,6 +46,7 @@ set(WebKit_INCLUDE_DIRECTORIES > "${WEBKIT_DIR}/UIProcess/Network" > "${WEBKIT_DIR}/UIProcess/Network/CustomProtocols" > "${WEBKIT_DIR}/UIProcess/Notifications" >+ "${WEBKIT_DIR}/UIProcess/Payment" > "${WEBKIT_DIR}/UIProcess/Plugins" > "${WEBKIT_DIR}/UIProcess/RemoteLayerTree" > "${WEBKIT_DIR}/UIProcess/UserContent" >@@ -120,6 +123,9 @@ set(WebKit_MESSAGES_IN_FILES > NetworkProcess/webrtc/NetworkRTCProvider.messages.in > NetworkProcess/webrtc/NetworkRTCSocket.messages.in > >+ PaymentProcess/PaymentProcess.messages.in >+ PaymentProcess/PaymentToWebProcessConnection.messages.in >+ > PluginProcess/PluginControllerProxy.messages.in > PluginProcess/PluginProcess.messages.in > PluginProcess/WebProcessConnection.messages.in >@@ -150,6 +156,8 @@ set(WebKit_MESSAGES_IN_FILES > > UIProcess/Network/NetworkProcessProxy.messages.in > >+ UIProcess/Payments/PaymentProcessProxy.messages.in >+ > UIProcess/Plugins/PluginProcessProxy.messages.in > > UIProcess/UserContent/WebUserContentControllerProxy.messages.in >@@ -220,6 +228,10 @@ set(NetworkProcess_LIBRARIES > WebKit > ) > >+set(PaymentProcess_LIBRARIES >+ WebKit >+) >+ > set(PluginProcess_LIBRARIES > WebKit > ) >diff --git a/Source/WebKit/Configurations/FeatureDefines.xcconfig b/Source/WebKit/Configurations/FeatureDefines.xcconfig >index 2e9a04d01bdd1421c4b457114bf89c3c784ef9c0..ad6b5f389e374afd7c050841107879efa82a7ae5 100644 >--- a/Source/WebKit/Configurations/FeatureDefines.xcconfig >+++ b/Source/WebKit/Configurations/FeatureDefines.xcconfig >@@ -292,6 +292,7 @@ ENABLE_NAVIGATOR_STANDALONE_cocoatouch = ENABLE_NAVIGATOR_STANDALONE; > ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(WK_PLATFORM_NAME)); > ENABLE_NOTIFICATIONS_macosx = ENABLE_NOTIFICATIONS; > >+ENABLE_PAYMENT_PROCESS = ENABLE_PAYMENT_PROCESS; > ENABLE_PAYMENT_REQUEST = ENABLE_PAYMENT_REQUEST; > > ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(WK_PLATFORM_NAME)); >diff --git a/Source/WebKit/Configurations/PaymentService.xcconfig b/Source/WebKit/Configurations/PaymentService.xcconfig >new file mode 100644 >index 0000000000000000000000000000000000000000..74d3888c8df0bdabd3a32714e610cb2efe57438d >--- /dev/null >+++ b/Source/WebKit/Configurations/PaymentService.xcconfig >@@ -0,0 +1,33 @@ >+// Copyright (C) 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. ``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 >+// 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 "BaseXPCService.xcconfig" >+ >+WK_PAYMENT_ENTITLEMENTS_RESTRICTED_NO = ; >+ >+CODE_SIGN_ENTITLEMENTS_COCOA_TOUCH_NO = $(WK_PAYMENT_ENTITLEMENTS_RESTRICTED_$(WK_USE_RESTRICTED_ENTITLEMENTS)); >+OTHER_CODE_SIGN_FLAGS = $(WK_LIBRARY_VALIDATION_CODE_SIGN_FLAGS); >+ >+PRODUCT_NAME = $(WK_PAYMENT_SERVICE_PRODUCT_NAME); >+PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_NAME); >+INFOPLIST_FILE[sdk=iphone*] = PaymentProcess/EntryPoint/ios/XPCService/PaymentService/Info-iOS.plist; >diff --git a/Source/WebKit/DerivedSources.make b/Source/WebKit/DerivedSources.make >index 2fde5550cf4d70adc09def357a98782273e55472..8605e7b6ccadedab9c8d77ea7da0782d3e534838 100644 >--- a/Source/WebKit/DerivedSources.make >+++ b/Source/WebKit/DerivedSources.make >@@ -30,6 +30,7 @@ VPATH = \ > $(WebKit2)/NetworkProcess/webrtc \ > $(WebKit2)/NetworkProcess/IndexedDB \ > $(WebKit2)/NetworkProcess/ServiceWorker \ >+ $(WebKit2)/PaymentProcess \ > $(WebKit2)/PluginProcess \ > $(WebKit2)/PluginProcess/mac \ > $(WebKit2)/Shared/Plugins \ >@@ -73,6 +74,7 @@ VPATH = \ > $(WebKit2)/UIProcess/Network \ > $(WebKit2)/UIProcess/Network/CustomProtocols \ > $(WebKit2)/UIProcess/Notifications \ >+ $(WebKit2)/UIProcess/Payments \ > $(WebKit2)/UIProcess/Plugins \ > $(WebKit2)/UIProcess/RemoteLayerTree \ > $(WebKit2)/UIProcess/Storage \ >@@ -118,6 +120,9 @@ MESSAGE_RECEIVERS = \ > NetworkSocketStream \ > PlaybackSessionManager \ > PlaybackSessionManagerProxy \ >+ PaymentProcess \ >+ PaymentProcessProxy \ >+ PaymentToWebProcessConnection \ > PluginControllerProxy \ > PluginProcess \ > PluginProcessConnection \ >diff --git a/Source/WebKit/PaymentProcess/EntryPoint/ios/XPCService/PaymentService/Info-iOS.plist b/Source/WebKit/PaymentProcess/EntryPoint/ios/XPCService/PaymentService/Info-iOS.plist >new file mode 100644 >index 0000000000000000000000000000000000000000..7669a6359ba4e0f31f282efeec60241674445881 >--- /dev/null >+++ b/Source/WebKit/PaymentProcess/EntryPoint/ios/XPCService/PaymentService/Info-iOS.plist >@@ -0,0 +1,43 @@ >+<?xml version="1.0" encoding="UTF-8"?> >+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> >+<plist version="1.0"> >+<dict> >+ <key>CFBundleGetInfoString</key> >+ <string>${BUNDLE_VERSION}, Copyright 2003-2018 Apple Inc.</string> >+ <key>CFBundleDevelopmentRegion</key> >+ <string>English</string> >+ <key>CFBundleExecutable</key> >+ <string>${EXECUTABLE_NAME}</string> >+ <key>CFBundleIdentifier</key> >+ <string>${PRODUCT_BUNDLE_IDENTIFIER}</string> >+ <key>CFBundleInfoDictionaryVersion</key> >+ <string>6.0</string> >+ <key>CFBundleName</key> >+ <string>${PRODUCT_NAME}</string> >+ <key>CFBundlePackageType</key> >+ <string>XPC!</string> >+ <key>CFBundleShortVersionString</key> >+ <string>${SHORT_VERSION_STRING}</string> >+ <key>CFBundleSignature</key> >+ <string>????</string> >+ <key>CFBundleVersion</key> >+ <string>${BUNDLE_VERSION}</string> >+ <key>LSFileQuarantineEnabled</key> >+ <true/> >+ <key>NSPrincipalClass</key> >+ <string>NSApplication</string> >+ <key>WebKitEntryPoint</key> >+ <string>PaymentServiceInitializer</string> >+ <key>LSUIElement</key> >+ <true/> >+ <key>XPCService</key> >+ <dict> >+ <key>ServiceType</key> >+ <string>Application</string> >+ <key>RunLoopType</key> >+ <string>NSRunLoop</string> >+ <key>_MultipleInstances</key> >+ <true/> >+ </dict> >+</dict> >+</plist> >diff --git a/Source/WebKit/PaymentProcess/EntryPoint/ios/XPCService/PaymentServiceEntryPoint.mm b/Source/WebKit/PaymentProcess/EntryPoint/ios/XPCService/PaymentServiceEntryPoint.mm >new file mode 100644 >index 0000000000000000000000000000000000000000..c7925ed3c285ed671e8085b646a9647c459e2e58 >--- /dev/null >+++ b/Source/WebKit/PaymentProcess/EntryPoint/ios/XPCService/PaymentServiceEntryPoint.mm >@@ -0,0 +1,55 @@ >+/* >+ * Copyright (C) 2013 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import "config.h" >+ >+#import "EnvironmentUtilities.h" >+#import "PaymentProcess.h" >+#import "WKBase.h" >+#import "XPCServiceEntryPoint.h" >+ >+namespace WebKit { >+ >+class PaymentServiceInitializerDelegate : public XPCServiceInitializerDelegate { >+public: >+ PaymentServiceInitializerDelegate(OSObjectPtr<xpc_connection_t> connection, xpc_object_t initializerMessage) >+ : XPCServiceInitializerDelegate(WTFMove(connection), initializerMessage) >+ { >+ } >+}; >+ >+} // namespace WebKit >+ >+using namespace WebKit; >+ >+extern "C" WK_EXPORT void PaymentServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage); >+ >+void PaymentServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage) >+{ >+ // Remove the SecItemShim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by >+ // the this process don't try to insert the shim and crash. >+ EnvironmentUtilities::stripValuesEndingWithString("DYLD_INSERT_LIBRARIES", "/SecItemShim.dylib"); >+ XPCServiceInitializer<PaymentProcess, PaymentServiceInitializerDelegate>(adoptOSObject(connection), initializerMessage, priorityBoostMessage); >+} >diff --git a/Source/WebKit/PaymentProcess/PaymentProcess.cpp b/Source/WebKit/PaymentProcess/PaymentProcess.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..32a34121029852973c68518ba0cb56ae4cbdf1cf >--- /dev/null >+++ b/Source/WebKit/PaymentProcess/PaymentProcess.cpp >@@ -0,0 +1,82 @@ >+/* >+ * Copyright (C) 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 "PaymentProcess.h" >+ >+#if ENABLE(PAYMENT_PROCESS) >+ >+using namespace WebCore; >+ >+namespace WebKit { >+ >+PaymentProcess& PaymentProcess::singleton() >+{ >+ static NeverDestroyed<PaymentProcess> process; >+ return process; >+} >+ >+PaymentProcess::PaymentProcess() >+{ >+} >+ >+PaymentProcess::~PaymentProcess() >+{ >+} >+ >+void PaymentProcess::initializeConnection(IPC::Connection* connection) >+{ >+ ChildProcess::initializeConnection(connection); >+} >+ >+bool PaymentProcess::shouldTerminate() >+{ >+ return true; >+} >+ >+void PaymentProcess::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder) >+{ >+ if (messageReceiverMap().dispatchMessage(connection, decoder)) >+ return; >+ >+ if (decoder.messageReceiverName() == Messages::PaymentProcess::messageReceiverName()) { >+ didReceivePaymentProcessMessage(connection, decoder); >+ return; >+ } >+ >+ if (decoder.messageReceiverName() == Messages::ChildProcess::messageReceiverName()) { >+ ChildProcess::didReceiveMessage(connection, decoder); >+ return; >+ } >+} >+ >+void PaymentProcess::createPaymentToWebProcessConnection(bool isServiceWorkerProcess, WebCore::SecurityOriginData&& securityOrigin) >+{ >+ notImplemented(); >+} >+ >+} // namespace WebKit >+ >+#endif // PAYMENT(PAYMENT_PROCESS) >diff --git a/Source/WebKit/PaymentProcess/PaymentProcess.h b/Source/WebKit/PaymentProcess/PaymentProcess.h >new file mode 100644 >index 0000000000000000000000000000000000000000..2f6de47e001740715dc6767ce610f476127ea5b6 >--- /dev/null >+++ b/Source/WebKit/PaymentProcess/PaymentProcess.h >@@ -0,0 +1,68 @@ >+/* >+ * Copyright (C) 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. >+ */ >+ >+#pragma once >+ >+#if ENABLE(PAYMENT_PROCESS) >+ >+#include "ChildProcess.h" >+#include <WebCore/SecurityOriginData.h> >+#include <pal/SessionID.h> >+#include <wtf/CrossThreadTask.h> >+#include <wtf/Function.h> >+ >+namespace WebKit { >+ >+class PaymentToWebProcessConnection; >+ >+class PaymentProcess : public ChildProcess { >+ WTF_MAKE_NONCOPYABLE(PaymentProcess); >+ friend NeverDestroyed<PaymentProcess>; >+public: >+ static PaymentProcess& singleton(); >+ static constexpr ProcessType processType = ProcessType::Payment; >+ >+ ~PaymentProcess(); >+ >+ void didReceivePaymentProcessMessage(IPC::Connection&, IPC::Decoder&); >+ >+private: >+ PaymentProcess(); >+ >+ // ChildProcess >+ void initializeConnection(IPC::Connection*) override; >+ bool shouldTerminate() override; >+ >+ // IPC::Connection::Client >+ void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; >+ >+ // Message Handlers >+ void createPaymentToWebProcessConnection(bool isServiceWorkerProcess, WebCore::SecurityOriginData&&); >+ >+}; >+ >+} // namespace WebKit >+ >+#endif // PAYMENT(PAYMENT_PROCESS) >diff --git a/Source/WebKit/PaymentProcess/PaymentProcess.messages.in b/Source/WebKit/PaymentProcess/PaymentProcess.messages.in >new file mode 100644 >index 0000000000000000000000000000000000000000..98b914fc4a8f44718cfa12576d338dae592aa0e3 >--- /dev/null >+++ b/Source/WebKit/PaymentProcess/PaymentProcess.messages.in >@@ -0,0 +1,28 @@ >+# Copyright (C) 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. >+ >+#if ENABLE(PAYMENT_PROCESS) >+ >+messages -> PaymentProcess { >+ >+} >+#endif // ENABLE(PAYMENT_PROCESS) >diff --git a/Source/WebKit/PaymentProcess/PaymentToWebProcessConnection.cpp b/Source/WebKit/PaymentProcess/PaymentToWebProcessConnection.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..c31c4088a2d6bcd941bc777c9ea3951a9199e78e >--- /dev/null >+++ b/Source/WebKit/PaymentProcess/PaymentToWebProcessConnection.cpp >@@ -0,0 +1,90 @@ >+/* >+ * Copyright (C) 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 "PaymentToWebProcessConnection.h" >+ >+#if ENABLE(PAYMENT_PROCESS) >+ >+#include "Logging.h" >+#include "PaymentProcess.h" >+#include "PaymentProcessMessages.h" >+#include "PaymentToWebProcessConnectionMessages.h" >+#include <wtf/RunLoop.h> >+ >+using namespace PAL; >+using namespace WebCore; >+ >+namespace WebKit { >+ >+Ref<PaymentToWebProcessConnection> PaymentToWebProcessConnection::create(IPC::Connection::Identifier connectionIdentifier) >+{ >+ return adoptRef(*new PaymentToWebProcessConnection(connectionIdentifier)); >+} >+ >+PaymentToWebProcessConnection::PaymentToWebProcessConnection(IPC::Connection::Identifier connectionIdentifier) >+ : m_connection(IPC::Connection::createServerConnection(connectionIdentifier, *this)) >+{ >+ // NOTE: we must set this to true because the WebContent process may re-enter when sending >+ // a sync IPC and this is a huge source of security bugs >+ m_connection->setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage(true) >+ m_connection->open(); >+} >+ >+PaymentToWebProcessConnection::~PaymentToWebProcessConnection() >+{ >+ m_connection->invalidate(); >+} >+ >+void PaymentToWebProcessConnection::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder) >+{ >+ if (decoder.messageReceiverName() == Messages::PaymentProcess::messageReceiverName()) { >+ PaymentProcess::singleton().didReceivePaymentProcessMessage(connection, decoder); >+ return; >+ } >+ >+ ASSERT_NOT_REACHED(); >+} >+ >+void PaymentToWebProcessConnection::didReceiveSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder) >+{ >+ ASSERT_NOT_REACHED(); >+} >+ >+void PaymentToWebProcessConnection::didClose(IPC::Connection& connection) >+{ >+ UNUSED_PARAM(connection); >+} >+ >+void PaymentToWebProcessConnection::didReceiveInvalidMessage(IPC::Connection& connection, IPC::StringReference messageReceiverName, IPC::StringReference messageName) >+{ >+ UNUSED_PARAM(connection); >+ UNUSED_PARAM(messageReceiverName); >+ UNUSED_PARAM(messageName); >+} >+ >+} // namespace WebKit >+ >+#endif // PAYMENT(PAYMENT_PROCESS) >diff --git a/Source/WebKit/PaymentProcess/PaymentToWebProcessConnection.h b/Source/WebKit/PaymentProcess/PaymentToWebProcessConnection.h >new file mode 100644 >index 0000000000000000000000000000000000000000..849a9eb4a137644116caced038307ab34081cffc >--- /dev/null >+++ b/Source/WebKit/PaymentProcess/PaymentToWebProcessConnection.h >@@ -0,0 +1,64 @@ >+/* >+ * Copyright (C) 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. >+ */ >+ >+#if ENABLE(PAYMENT_PROCESS) >+ >+#pragma once >+ >+#include "Connection.h" >+#include "MessageSender.h" >+#include <pal/SessionID.h> >+#include <wtf/HashMap.h> >+ >+namespace WebKit { >+ >+class PaymentToWebProcessConnection : public RefCounted<PaymentToWebProcessConnection>, private IPC::Connection::Client, private IPC::MessageSender { >+public: >+ static Ref<PaymentToWebProcessConnection> create(IPC::Connection::Identifier); >+ ~PaymentToWebProcessConnection(); >+ >+ IPC::Connection& connection() { return m_connection.get(); } >+ >+private: >+ PaymentToWebProcessConnection(IPC::Connection::Identifier); >+ >+ // IPC::Connection::Client >+ void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; >+ void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override; >+ void didClose(IPC::Connection&) override; >+ void didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) override; >+ void didReceivePaymentToWebProcessConnectionMessage(IPC::Connection&, IPC::Decoder&); >+ void didReceiveSyncPaymentToWebProcessConnectionMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&); >+ >+ // IPC::MessageSender >+ IPC::Connection* messageSenderConnection() override { return m_connection.ptr(); } >+ uint64_t messageSenderDestinationID() override { return 0; } >+ >+ Ref<IPC::Connection> m_connection; >+}; >+ >+} // namespace WebKit >+ >+#endif // PAYMENT(PAYMENT_PROCESS) >diff --git a/Source/WebKit/PaymentProcess/PaymentToWebProcessConnection.messages.in b/Source/WebKit/PaymentProcess/PaymentToWebProcessConnection.messages.in >new file mode 100644 >index 0000000000000000000000000000000000000000..817f0d8689958383aa81dcc82d3cb7d5c444d888 >--- /dev/null >+++ b/Source/WebKit/PaymentProcess/PaymentToWebProcessConnection.messages.in >@@ -0,0 +1,26 @@ >+# Copyright (C) 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. >+ >+#if ENABLE(PAYMENT_PROCESS) >+messages -> PaymentToWebProcessConnection { >+} >+#endif >diff --git a/Source/WebKit/PaymentProcess/ios/PaymentProcessIOS.mm b/Source/WebKit/PaymentProcess/ios/PaymentProcessIOS.mm >new file mode 100644 >index 0000000000000000000000000000000000000000..ecdbd5463a29a11cd25a5c70610c0f10290326e4 >--- /dev/null >+++ b/Source/WebKit/PaymentProcess/ios/PaymentProcessIOS.mm >@@ -0,0 +1,61 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import "config.h" >+#import "PaymentProcess.h" >+ >+#if ENABLE(PAYMENT_PROCESS) >+ >+#if PLATFORM(IOS) >+ >+#import "SandboxInitializationParameters.h" >+ >+#define ENABLE_MANUAL_DATABASE_SANDBOXING 0 >+ >+namespace WebKit { >+ >+void PaymentProcess::initializeProcess(const ChildProcessInitializationParameters&) >+{ >+} >+ >+void PaymentProcess::initializeProcessName(const ChildProcessInitializationParameters& parameters) >+{ >+} >+ >+void PaymentProcess::initializeSandbox(const ChildProcessInitializationParameters& parameters, SandboxInitializationParameters& sandboxParameters) >+{ >+#if ENABLE_MANUAL_DATABASE_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.Payments" ofType:@"sb"]); >+ ChildProcess::initializeSandbox(parameters, sandboxParameters); >+#endif >+} >+ >+} // namespace WebKit >+ >+#endif // PLATFORM(IOS) >+ >+#endif // PAYMENT(PAYMENT_PROCESS) >diff --git a/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Payments.sb b/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Payments.sb >new file mode 100644 >index 0000000000000000000000000000000000000000..10672c686b1667ad97f5dfd75a4b3a7bdc0607b3 >--- /dev/null >+++ b/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.Payments.sb >@@ -0,0 +1,32 @@ >+; Copyright (C) 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. >+ >+(version 1) >+(deny default (with partial-symbolication)) >+(allow system-audit file-read-metadata) >+ >+(import "common.sb") >+ >+(deny mach-lookup (xpc-service-name-prefix "")) >+ >+(deny lsopen) >diff --git a/Source/WebKit/Shared/ChildProcess.h b/Source/WebKit/Shared/ChildProcess.h >index a72bc929dbd7c74c22669b82317a61ffabdf3769..31e81f2b6ea959dcdc4e21686872449f8ab95a6c 100644 >--- a/Source/WebKit/Shared/ChildProcess.h >+++ b/Source/WebKit/Shared/ChildProcess.h >@@ -48,6 +48,9 @@ public: > enum class ProcessType : uint8_t { > WebContent, > Network, >+#if ENABLE(PAYMENT_PROCESS) >+ Payment, >+#endif // ENABLE(PAYMENT_PROCESS) > Plugin > }; > >diff --git a/Source/WebKit/Shared/ProcessExecutablePath.h b/Source/WebKit/Shared/ProcessExecutablePath.h >index 2ce716e4c72e582abe30f4879d2c6eb9e499a97b..62b5474efaa724eab528b4f6701791f0ce9aade0 100644 >--- a/Source/WebKit/Shared/ProcessExecutablePath.h >+++ b/Source/WebKit/Shared/ProcessExecutablePath.h >@@ -32,5 +32,8 @@ namespace WebKit { > String executablePathOfWebProcess(); > String executablePathOfPluginProcess(); > String executablePathOfNetworkProcess(); >+#if ENABLE(PAYMENT_PROCESS) >+String executablePathOfPaymentProcess(); >+#endif // !ENABLE(PAYMENT_PROCESS) > > } >diff --git a/Source/WebKit/Sources.txt b/Source/WebKit/Sources.txt >index 055ec5e576102f78649847ae3e34ae3e3c2c24a3..27dfbf1d5e31ec9b5877d96ed8c3e9a986f69da1 100644 >--- a/Source/WebKit/Sources.txt >+++ b/Source/WebKit/Sources.txt >@@ -73,6 +73,9 @@ NetworkProcess/cache/NetworkCacheSubresourcesEntry.cpp > > NetworkProcess/webrtc/NetworkMDNSRegister.cpp > >+PaymentProcess/PaymentProcess.cpp >+PaymentProcess/PaymentToWebProcessConnection.cpp >+ > // TODO: We should unify these files once GTK's PluginProcess2 is removed. > Platform/Logging.cpp @no-unify > Platform/Module.cpp @no-unify >@@ -374,6 +377,8 @@ UIProcess/Notifications/WebNotification.cpp > UIProcess/Notifications/WebNotificationManagerProxy.cpp > UIProcess/Notifications/WebNotificationProvider.cpp > >+UIProcess/Payments/PaymentProcessProxy.cpp >+ > UIProcess/Plugins/PlugInAutoStartProvider.cpp > UIProcess/Plugins/PluginInfoStore.cpp > UIProcess/Plugins/PluginProcessManager.cpp >@@ -475,6 +480,8 @@ WebProcess/Network/webrtc/WebRTCSocket.cpp > WebProcess/Notifications/NotificationPermissionRequestManager.cpp > WebProcess/Notifications/WebNotificationManager.cpp > >+WebProcess/Payments/WebToPaymentProcessConnection.cpp >+ > // TODO: These files should be unified once GTK's PluginProcess2 is removed. > WebProcess/Plugins/Plugin.cpp @no-unify > WebProcess/Plugins/PluginProcessConnection.cpp @no-unify >diff --git a/Source/WebKit/SourcesCocoa.txt b/Source/WebKit/SourcesCocoa.txt >index f1a057a45db0fa35ce10dcf419693efe818a6da3..a3f5b91e1977244d1ec63403205bea03a841b0ef 100644 >--- a/Source/WebKit/SourcesCocoa.txt >+++ b/Source/WebKit/SourcesCocoa.txt >@@ -184,6 +184,8 @@ Shared/mac/WebGestureEvent.cpp > Shared/mac/WebHitTestResultData.mm > Shared/mac/WebMemorySampler.mac.mm > >+PaymentProcess/ios/PaymentProcessIOS.mm >+ > Shared/Plugins/mac/PluginSandboxProfile.mm > > Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm >diff --git a/Source/WebKit/UIProcess/API/C/WKContext.cpp b/Source/WebKit/UIProcess/API/C/WKContext.cpp >index 5f1bee46b6a697c46306e89db7dcb2f3aebf4090..e36fd4aa81046ee6abbad2d89fd04c9d0ecd91d9 100644 >--- a/Source/WebKit/UIProcess/API/C/WKContext.cpp >+++ b/Source/WebKit/UIProcess/API/C/WKContext.cpp >@@ -616,11 +616,27 @@ void WKContextTerminateServiceWorkerProcess(WKContextRef context) > WebKit::toImpl(context)->terminateServiceWorkerProcesses(); > } > >+void WKContextTerminatePaymentProcess(WKContextRef context) >+{ >+#if ENABLE(PAYMENT_PROCESS) >+ toImpl(context)->terminatePaymentProcessForTesting(); >+#endif // ENABLE(PAYMENT_PROCESS) >+} >+ > ProcessID WKContextGetNetworkProcessIdentifier(WKContextRef contextRef) > { > return WebKit::toImpl(contextRef)->networkProcessIdentifier(); > } > >+ProcessID WKContextGetPaymentProcessIdentifier(WKContextRef contextRef) >+{ >+#if ENABLE(PAYMENT_PROCESS) >+ return toImpl(contextRef)->paymentProcessIdentifier(); >+#else >+ return 0; >+#endif // ENABLE(PAYMENT_PROCESS) >+} >+ > void WKContextAddSupportedPlugin(WKContextRef contextRef, WKStringRef domainRef, WKStringRef nameRef, WKArrayRef mimeTypesRef, WKArrayRef extensionsRef) > { > #if ENABLE(NETSCAPE_PLUGIN_API) >diff --git a/Source/WebKit/UIProcess/API/C/WKContext.h b/Source/WebKit/UIProcess/API/C/WKContext.h >index c2de3afbc3e89ca649c4fa138c595115f33cb89d..c7cbd686b026273a054cd1988aa79a09d2154022 100644 >--- a/Source/WebKit/UIProcess/API/C/WKContext.h >+++ b/Source/WebKit/UIProcess/API/C/WKContext.h >@@ -50,6 +50,7 @@ typedef WKDataRef (*WKContextCopyWebCryptoMasterKeyCallback)(WKContextRef contex > > typedef void (*WKContextChildProcessDidCrashCallback)(WKContextRef context, const void *clientInfo); > typedef WKContextChildProcessDidCrashCallback WKContextNetworkProcessDidCrashCallback; >+typedef WKContextChildProcessDidCrashCallback WKContextPaymentProcessDidCrashCallback; > > typedef struct WKContextClientBase { > int version; >diff --git a/Source/WebKit/UIProcess/API/C/WKContextPrivate.h b/Source/WebKit/UIProcess/API/C/WKContextPrivate.h >index f9c7d3296e5c0cd7f3367de39a031d283fbe6666..8ed4b4f764151e1836b598ddba0a6c62c637dd5b 100644 >--- a/Source/WebKit/UIProcess/API/C/WKContextPrivate.h >+++ b/Source/WebKit/UIProcess/API/C/WKContextPrivate.h >@@ -93,6 +93,8 @@ WK_EXPORT void WKContextSetUsesNetworkProcess(WKContextRef, bool); > WK_EXPORT void WKContextTerminateNetworkProcess(WKContextRef); > WK_EXPORT void WKContextTerminateServiceWorkerProcess(WKContextRef); > >+WK_EXPORT void WKContextTerminatePaymentProcess(WKContextRef); >+ > WK_EXPORT void WKContextSetAllowsAnySSLCertificateForWebSocketTesting(WKContextRef, bool); > WK_EXPORT void WKContextSetAllowsAnySSLCertificateForServiceWorkerTesting(WKContextRef, bool); > >@@ -112,6 +114,7 @@ WK_EXPORT void WKContextSetFontWhitelist(WKContextRef, WKArrayRef); > WK_EXPORT void WKContextPreconnectToServer(WKContextRef context, WKURLRef serverURL); > > WK_EXPORT WKProcessID WKContextGetNetworkProcessIdentifier(WKContextRef context); >+WK_EXPORT WKProcessID WKContextGetPaymentProcessIdentifier(WKContextRef context); > > WK_EXPORT void WKContextAddSupportedPlugin(WKContextRef context, WKStringRef domain, WKStringRef name, WKArrayRef mimeTypes, WKArrayRef extensions); > WK_EXPORT void WKContextClearSupportedPlugins(WKContextRef context); >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm b/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm >index a18381ab35a97dba2fc3fab67320b4322764d785..9e70c604bb99bfd48ea400e2a1581986b1e0c454 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm >@@ -426,6 +426,13 @@ - (void)_clearSupportedPlugins > _processPool->clearSupportedPlugins(); > } > >+- (void)_terminatePaymentProcess >+{ >+#if ENABLE(PAYMENT_PROCESS) >+ _processPool->terminatePaymentProcessForTesting(); >+#endif // ENABLE(PAYMENT_PROCESS) >+} >+ > - (void)_terminateNetworkProcess > { > _processPool->terminateNetworkProcess(); >@@ -446,6 +453,15 @@ - (pid_t)_networkProcessIdentifier > return _processPool->networkProcessIdentifier(); > } > >+- (pid_t)_paymentProcessIdentifier >+{ >+#if ENABLE(PAYMENT_PROCESS) >+ return _processPool->paymentProcessIdentifier(); >+#else >+ return 0; >+#endif // ENABLE(PAYMENT_PROCESS) >+} >+ > - (void)_syncNetworkProcessCookies > { > _processPool->syncNetworkProcessCookies(); >diff --git a/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h b/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h >index 3de2c0362bf35e67b0434c1ef8bc83d606a14c36..62d8357af6c6b86d0c8f4d75159f975e11d6e1e7 100644 >--- a/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h >+++ b/Source/WebKit/UIProcess/API/Cocoa/WKProcessPoolPrivate.h >@@ -85,12 +85,14 @@ > - (_WKDownload *)_resumeDownloadFromData:(NSData *)resumeData path:(NSString *)path originatingWebView:(WKWebView *)webView WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > > // Test only. Should be called only while no web content processes are running. >+- (void)_terminatePaymentProcess WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > - (void)_terminateNetworkProcess; > - (void)_terminateServiceWorkerProcesses WK_API_AVAILABLE(macosx(10.14), ios(12.0)); > - (void)_disableServiceWorkerProcessTerminationDelay WK_API_AVAILABLE(macosx(10.14), ios(12.0)); > > // Test only. > - (pid_t)_networkProcessIdentifier WK_API_AVAILABLE(macosx(10.13), ios(11.0)); >+- (pid_t)_paymentProcessIdentifier WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); > > // Test only. > - (size_t)_webProcessCount WK_API_AVAILABLE(macosx(10.13), ios(11.0)); >diff --git a/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h b/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h >index e07dba272a2e15be829de234c5dd50d5738e1a0c..14a39fa8ce75a59c31a18683dcad065180df3d87 100644 >--- a/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h >+++ b/Source/WebKit/UIProcess/Launcher/ProcessLauncher.h >@@ -58,6 +58,9 @@ public: > Plugin64, > #endif > Network, >+#if ENABLE(PAYMENT_PROCESS) >+ Payment, >+#endif // ENABLE(PAYMENT_PROCESS) > }; > > struct LaunchOptions { >diff --git a/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm b/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm >index 6cbac25d784c0eeea58a684ab468445ae2e39262..846764579e6196f70fd047f43dafb9c6d94d164e 100644 >--- a/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm >+++ b/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm >@@ -62,6 +62,10 @@ static const char* serviceName(const ProcessLauncher::LaunchOptions& launchOptio > case ProcessLauncher::ProcessType::Plugin64: > return "com.apple.WebKit.Plugin.64"; > #endif >+#if ENABLE(PAYMENT_PROCESS) >+ case ProcessLauncher::ProcessType::Payment: >+ return "com.apple.WebKit.Payments"; >+#endif // ENABLE(PAYMENT_PROCESS) > } > } > >diff --git a/Source/WebKit/UIProcess/Payments/PaymentProcessProxy.cpp b/Source/WebKit/UIProcess/Payments/PaymentProcessProxy.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..7e7b54552f69f5916acf4af376a55a340706e8dd >--- /dev/null >+++ b/Source/WebKit/UIProcess/Payments/PaymentProcessProxy.cpp >@@ -0,0 +1,134 @@ >+/* >+ * Copyright (C) 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 "PaymentProcessProxy.h" >+ >+#if ENABLE(PAYMENT_PROCESS) >+ >+#include "PaymentProcessMessages.h" >+#include "PaymentProcessProxyMessages.h" >+#include "ServiceWorkerProcessProxy.h" >+#include "WebProcessPool.h" >+#include "WebsiteData.h" >+#include <WebCore/NotImplemented.h> >+ >+namespace WebKit { >+using namespace WebCore; >+ >+PaymentProcessProxy::PaymentProcessProxy(WebProcessPool& processPool) >+ : ChildProcessProxy(processPool.alwaysRunsAtBackgroundPriority()) >+ , m_processPool(processPool) >+ , m_numPendingConnectionRequests(0) >+{ >+ connect(); >+} >+ >+PaymentProcessProxy::~PaymentProcessProxy() >+{ >+} >+ >+void PaymentProcessProxy::terminateForTesting() >+{ >+ terminate(); >+} >+ >+void PaymentProcessProxy::getPaymentProcessConnection(WebProcessProxy& webProcessProxy, Messages::WebProcessProxy::GetPaymentProcessConnection::DelayedReply&& reply) >+{ >+ m_pendingConnectionReplies.append(WTFMove(reply)); >+ >+ if (state() == State::Launching) { >+ m_numPendingConnectionRequests++; >+ return; >+ } >+ >+ bool isServiceWorkerProcess = false; >+ SecurityOriginData securityOrigin; >+ >+ send(Messages::PaymentProcess::CreatePaymentToWebProcessConnection(isServiceWorkerProcess, securityOrigin), 0, IPC::SendOption::DispatchMessageEvenWhenWaitingForSyncReply); >+} >+ >+void PaymentProcessProxy::getLaunchOptions(ProcessLauncher::LaunchOptions& launchOptions) >+{ >+ launchOptions.processType = ProcessLauncher::ProcessType::Payment; >+ ChildProcessProxy::getLaunchOptions(launchOptions); >+} >+ >+void PaymentProcessProxy::processWillShutDown(IPC::Connection& connection) >+{ >+ ASSERT_UNUSED(connection, this->connection() == &connection); >+} >+ >+void PaymentProcessProxy::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder) >+{ >+ if (decoder.messageReceiverName() == Messages::PaymentProcessProxy::messageReceiverName()) { >+ didReceivePaymentProcessProxyMessage(connection, decoder); >+ return; >+ } >+} >+ >+void PaymentProcessProxy::didClose(IPC::Connection&) >+{ >+ auto protectedProcessPool = makeRef(m_processPool); >+ >+ // The payment process must have crashed or exited, so send any pending sync replies we might have. >+ while (!m_pendingConnectionReplies.isEmpty()) { >+ auto reply = m_pendingConnectionReplies.takeFirst(); >+ notImplemented(); >+ } >+ // Tell ProcessPool to forget about this payment process. This may cause us to be deleted. >+ m_processPool.paymentProcessCrashed(*this); >+} >+ >+void PaymentProcessProxy::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) >+{ >+} >+ >+void didReceivePaymentProcessProxyMessage(IPC::Connection&, IPC::Decoder&) >+{ >+} >+ >+void PaymentProcessProxy::didCreatePaymentToWebProcessConnection(const IPC::Attachment& connectionIdentifier) >+{ >+ notImplemented(); >+} >+ >+void PaymentProcessProxy::didFinishLaunching(ProcessLauncher* launcher, IPC::Connection::Identifier connectionIdentifier) >+{ >+ ChildProcessProxy::didFinishLaunching(launcher, connectionIdentifier); >+ >+ if (!IPC::Connection::identifierIsValid(connectionIdentifier)) { >+ // FIXME: Do better cleanup here. >+ return; >+ } >+ >+ for (unsigned i = 0; i < m_numPendingConnectionRequests; ++i) >+ send(Messages::PaymentProcess::CreatePaymentToWebProcessConnection(false, { }), 0); >+ >+ m_numPendingConnectionRequests = 0; >+} >+ >+} // namespace WebKit >+#endif // ENABLE(PAYMENT_PROCESS) >diff --git a/Source/WebKit/UIProcess/Payments/PaymentProcessProxy.h b/Source/WebKit/UIProcess/Payments/PaymentProcessProxy.h >new file mode 100644 >index 0000000000000000000000000000000000000000..e031c7c67b4f0e9426b11d10f1e554595784f05c >--- /dev/null >+++ b/Source/WebKit/UIProcess/Payments/PaymentProcessProxy.h >@@ -0,0 +1,84 @@ >+/* >+ * Copyright (C) 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. >+ */ >+#if ENABLE(PAYMENT_PROCESS) >+ >+#pragma once >+ >+#include "ChildProcessProxy.h" >+#include "ProcessLauncher.h" >+#include "WebProcessProxyMessages.h" >+#include <wtf/Deque.h> >+#include <wtf/Forward.h> >+ >+namespace PAL { >+class SessionID; >+} >+ >+namespace WebCore { >+class SecurityOrigin; >+struct SecurityOriginData; >+} >+ >+namespace WebKit { >+ >+class WebProcessPool; >+class WebProcessProxy; >+enum class WebsiteDataType; >+struct WebsiteData; >+ >+class PaymentProcessProxy final : public ChildProcessProxy { >+public: >+ explicit PaymentProcessProxy(WebProcessPool&); >+ ~PaymentProcessProxy(); >+ >+ void terminateForTesting(); >+ void getPaymentProcessConnection(WebProcessProxy&, Messages::WebProcessProxy::GetPaymentProcessConnection::DelayedReply&&); >+ >+private: >+ // ChildProcessProxy >+ void getLaunchOptions(ProcessLauncher::LaunchOptions&) override; >+ void processWillShutDown(IPC::Connection&) override; >+ >+ // IPC::Connection::Client >+ void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; >+ void didClose(IPC::Connection&) override; >+ void didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) override; >+ >+ void didReceivePaymentProcessProxyMessage(IPC::Connection&, IPC::Decoder&); >+ >+ // Message handlers >+ void didCreatePaymentToWebProcessConnection(const IPC::Attachment&); >+ >+ // ProcessLauncher::Client >+ void didFinishLaunching(ProcessLauncher*, IPC::Connection::Identifier) override; >+ >+ WebProcessPool& m_processPool; >+ >+ unsigned m_numPendingConnectionRequests; >+ Deque<Messages::WebProcessProxy::GetPaymentProcessConnection::DelayedReply> m_pendingConnectionReplies; >+}; >+ >+} // namespace WebKit >+#endif // ENABLE(PAYMENT_PROCESS) >diff --git a/Source/WebKit/UIProcess/Payments/PaymentProcessProxy.messages.in b/Source/WebKit/UIProcess/Payments/PaymentProcessProxy.messages.in >new file mode 100644 >index 0000000000000000000000000000000000000000..5b0d51772aaeec70ebc60f3546b8e1276f80646c >--- /dev/null >+++ b/Source/WebKit/UIProcess/Payments/PaymentProcessProxy.messages.in >@@ -0,0 +1,28 @@ >+# Copyright (C) 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. >+ >+#if ENABLE(PAYMENT_PROCESS) >+messages -> PaymentProcessProxy { >+ DidCreatePaymentToWebProcessConnection(IPC::Attachment connectionIdentifier) >+ >+} >+#endif // ENABLE(PAYMENT_PROCESS) >diff --git a/Source/WebKit/UIProcess/WebContextClient.cpp b/Source/WebKit/UIProcess/WebContextClient.cpp >index fa45762eceba013a6aca4f964da856639741d575..bec79b54cbf6c6ec5efeff4a97570f699b553f11 100644 >--- a/Source/WebKit/UIProcess/WebContextClient.cpp >+++ b/Source/WebKit/UIProcess/WebContextClient.cpp >@@ -46,4 +46,11 @@ void WebContextClient::networkProcessDidCrash(WebProcessPool* processPool) > m_client.networkProcessDidCrash(toAPI(processPool), m_client.base.clientInfo); > } > >+#if ENABLE(PAYMENT_PROCESS) >+void WebContextClient::paymentProcessDidCrash(WebProcessPool* processPool) >+{ >+ >+} >+#endif // ENABLE(PAYMENT_PROCESS) >+ > } // namespace WebKit >diff --git a/Source/WebKit/UIProcess/WebContextClient.h b/Source/WebKit/UIProcess/WebContextClient.h >index 80c31122c0776d4ee8d778d566821015221637d6..59b3a4079108f238f1d6f8abf1ab9edcc8453916 100644 >--- a/Source/WebKit/UIProcess/WebContextClient.h >+++ b/Source/WebKit/UIProcess/WebContextClient.h >@@ -45,6 +45,10 @@ class WebContextClient : public API::Client<WKContextClientBase> { > public: > void plugInAutoStartOriginHashesChanged(WebProcessPool*); > void networkProcessDidCrash(WebProcessPool*); >+#if ENABLE(PAYMENT_PROCESS) >+ void paymentProcessDidCrash(WebProcessPool*); >+#endif // ENABLE(PAYMENT_PROCESS) >+ > }; > > } // namespace WebKit >diff --git a/Source/WebKit/UIProcess/WebContextSupplement.h b/Source/WebKit/UIProcess/WebContextSupplement.h >index ed55b403db29f9400438ba32a60c758274934fa6..2c6acbb05cb026acda75c067d1f0d9d459a127e7 100644 >--- a/Source/WebKit/UIProcess/WebContextSupplement.h >+++ b/Source/WebKit/UIProcess/WebContextSupplement.h >@@ -29,6 +29,10 @@ > namespace WebKit { > > class NetworkProcessProxy; >+#if ENABLE(PAYMENT_PROCESS) >+class PaymentProcessProxy; >+#endif // ENABLE(PAYMENT_PROCESS) >+ > class WebProcessPool; > class WebProcessProxy; > >@@ -54,6 +58,12 @@ public: > virtual void processDidClose(NetworkProcessProxy*) > { > } >+ >+#if ENABLE(PAYMENT_PROCESS) >+ virtual void processDidClose(PaymentProcessProxy*) >+ { >+ } >+#endif // ENABLE(PAYMENT_PROCESS) > > WebProcessPool* processPool() const { return m_processPool; } > void clearProcessPool() { m_processPool = nullptr; } >diff --git a/Source/WebKit/UIProcess/WebInspectorProxy.cpp b/Source/WebKit/UIProcess/WebInspectorProxy.cpp >index 308c504c128cb05a16a12a4897b47c586c48453e..bce1f896b0fb63812d99f579f6516f3fa9c67c81 100644 >--- a/Source/WebKit/UIProcess/WebInspectorProxy.cpp >+++ b/Source/WebKit/UIProcess/WebInspectorProxy.cpp >@@ -645,7 +645,7 @@ void WebInspectorProxy::platformInspectedURLChanged(const String&) > notImplemented(); > } > >-void WebInspectorProxy::platformShowCertificate(const CertificateInfo&) >+void WebInspectorProxy::platformShowCertificate(const WebCore::CertificateInfo&) > { > notImplemented(); > } >diff --git a/Source/WebKit/UIProcess/WebProcessPool.cpp b/Source/WebKit/UIProcess/WebProcessPool.cpp >index 82830a53f61494b12020d48152078a5c93e2a5ca..651020623a7ea6511b073366130c6569a74def07 100644 >--- a/Source/WebKit/UIProcess/WebProcessPool.cpp >+++ b/Source/WebKit/UIProcess/WebProcessPool.cpp >@@ -54,6 +54,9 @@ > #include "SandboxExtension.h" > #include "ServiceWorkerProcessProxy.h" > #include "StatisticsData.h" >+#if ENABLE(PAYMENT_PROCESS) >+#include "PaymentProcessMessages.h" >+#endif // ENABLE(PAYMENT_PROCESS) > #include "TextChecker.h" > #include "UIGamepad.h" > #include "UIGamepadProvider.h" >@@ -442,6 +445,9 @@ void WebProcessPool::sendMemoryPressureEvent(bool isCritical) > { > sendToAllProcesses(Messages::ChildProcess::DidReceiveMemoryPressureEvent(isCritical)); > sendToNetworkingProcess(Messages::ChildProcess::DidReceiveMemoryPressureEvent(isCritical)); >+#if ENABLE(PAYMENT_PROCESS) >+ sendToPaymentProcess(Messages::ChildProcess::DidReceiveMemoryPressureEvent(isCritical)); >+#endif // ENABLE(PAYMENT_PROCESS) > #if ENABLE(NETSCAPE_PLUGIN_API) > PluginProcessManager::singleton().sendMemoryPressureEvent(isCritical); > #endif >@@ -617,6 +623,36 @@ void WebProcessPool::getNetworkProcessConnection(WebProcessProxy& webProcessProx > m_networkProcess->getNetworkProcessConnection(webProcessProxy, WTFMove(reply)); > } > >+#if ENABLE(PAYMENT_PROCESS) >+void WebProcessPool::ensurePaymentProcess() >+{ >+ if (!m_paymentProcess) >+ m_paymentProcess = std::make_unique<PaymentProcessProxy>(*this); >+} >+ >+void WebProcessPool::getPaymentProcessConnection(WebProcessProxy& webProcessProxy, PAL::SessionID initialSessionID, Messages::WebProcessProxy::GetPaymentProcessConnection::DelayedReply&& reply) >+{ >+ ensurePaymentProcess(); >+ m_paymentProcess->getPaymentProcessConnection(webProcessProxy, WTFMove(reply)); >+} >+ >+void WebProcessPool::paymentProcessCrashed(PaymentProcessProxy& paymentProcessProxy) >+{ >+ ASSERT(m_paymentProcess); >+ ASSERT(paymentProcessProxy == m_paymentProcess.get()); >+ >+ for (auto& supplement : m_supplements.values()) >+ supplement->processDidClose(paymentProcessProxy); >+ >+ m_client.paymentProcessDidCrash(this); >+ >+ if (m_automationSession) >+ m_automationSession->terminate(); >+ >+ m_paymentProcess = nullptr; >+} >+#endif // ENABLE(PAYMENT_PROCESS) >+ > #if ENABLE(SERVICE_WORKER) > void WebProcessPool::establishWorkerContextConnectionToNetworkProcess(NetworkProcessProxy& proxy, SecurityOriginData&& securityOrigin, std::optional<PAL::SessionID> sessionID) > { >@@ -693,6 +729,9 @@ void WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled(bool private > sendToAllProcesses(Messages::WebProcess::AddWebsiteDataStore(WebsiteDataStoreParameters::legacyPrivateSessionParameters())); > } else { > networkProcess()->removeSession(PAL::SessionID::legacyPrivateSessionID()); >+#if ENABLE(PAYMENT_PROCESS) >+ sendToPaymentProcess(Messages::PaymentProcess::DestroySession(PAL::SessionID::defaultSessionID())); >+#endif // ENABLE(PAYMENT_PROCESS) > sendToAllProcesses(Messages::WebProcess::DestroySession(PAL::SessionID::legacyPrivateSessionID())); > } > } >@@ -1354,6 +1393,15 @@ void WebProcessPool::activePagesOriginsInWebProcessForTesting(ProcessID pid, Com > } > completionHandler({ }); > } >+#if ENABLE(PAYMENT_PROCESS) >+ProcessID WebProcessPool::paymentProcessIdentifier() >+{ >+ if (!m_paymentProcess) >+ return 0; >+ >+ return m_paymentProcess->processIdentifier(); >+} >+#endif // ENABLE(PAYMENT_PROCESS) > > void WebProcessPool::setAlwaysUsesComplexTextCodePath(bool alwaysUseComplexText) > { >@@ -1625,6 +1673,17 @@ void WebProcessPool::clearCachedCredentials() > if (m_networkProcess) > m_networkProcess->send(Messages::NetworkProcess::ClearCachedCredentials(), 0); > } >+ >+#if ENABLE(PAYMENT_PROCESS) >+void WebProcessPool::terminatePaymentProcessForTesting() >+{ >+ if (!m_paymentProcess) >+ return; >+ >+ m_paymentProcess->terminateForTesting(); >+ m_paymentProcess = nullptr; >+} >+#endif // ENABLE(PAYMENT_PROCESS) > > void WebProcessPool::terminateNetworkProcess() > { >diff --git a/Source/WebKit/UIProcess/WebProcessPool.h b/Source/WebKit/UIProcess/WebProcessPool.h >index 06343249baa725afb6cb444c5523253d17e080bc..5f70033dadcff0abbc84e733d5643251e4b59815 100644 >--- a/Source/WebKit/UIProcess/WebProcessPool.h >+++ b/Source/WebKit/UIProcess/WebProcessPool.h >@@ -40,6 +40,9 @@ > #include "ProcessThrottler.h" > #include "ServiceWorkerProcessProxy.h" > #include "StatisticsRequest.h" >+#if ENABLE(PAYMENT_PROCESS) >+#include "PaymentProcessProxy.h" >+#endif // ENABLE(PAYMENT_PROCESS) > #include "VisitedLinkStore.h" > #include "WebContextClient.h" > #include "WebContextConnectionClient.h" >@@ -173,6 +176,11 @@ public: > template<typename T, typename U> void sendSyncToNetworkingProcess(T&& message, U&& reply); > template<typename T> void sendToNetworkingProcessRelaunchingIfNecessary(T&& message); > >+#if ENABLE(PAYMENT_PROCESS) >+ template<typename T> void sendToPaymentProcess(T&& message); >+ template<typename T> void sendToPaymentProcessRelaunchingIfNecessary(T&& message); >+#endif // ENABLE(PAYMENT_PROCESS) >+ > void processDidFinishLaunching(WebProcessProxy*); > > // Disconnect the process from the context. >@@ -217,6 +225,9 @@ public: > ProcessID networkProcessIdentifier(); > void activePagesOriginsInWebProcessForTesting(ProcessID, CompletionHandler<void(Vector<String>&&)>&&); > bool networkProcessHasEntitlementForTesting(const String&); >+#if ENABLE(PAYMENT_PROCESS) >+ ProcessID paymentProcessIdentifier(); >+#endif // ENABLE(PAYMENT_PROCESS) > > WebPageGroup& defaultPageGroup() { return m_defaultPageGroup.get(); } > >@@ -276,6 +287,9 @@ public: > void setAllowsAnySSLCertificateForWebSocket(bool); > > void clearCachedCredentials(); >+#if ENABLE(PAYMENT_PROCESS) >+ void terminatePaymentProcessForTesting(); >+#endif // ENABLE(PAYMENT_PROCESS) > void terminateNetworkProcess(); > void terminateServiceWorkerProcesses(); > void disableServiceWorkerProcessTerminationDelay(); >@@ -344,6 +358,12 @@ public: > > void getNetworkProcessConnection(WebProcessProxy&, Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply&&); > >+#if ENABLE(PAYMENT_PROCESS) >+ void ensurePaymentProcess(); >+ PaymentProcessProxy* paymentProcess() { return m_paymentProcess.get(); } >+ void getPaymentProcessConnection(WebProcessProxy&, PAL::SessionID initialSessionID, Messages::WebProcessProxy::GetPaymentProcessConnection::DelayedReply&&); >+ void paymentProcessCrashed(PaymentProcessProxy*); >+#endif // ENABLE(PAYMENT_PROCESS) > #if ENABLE(SERVICE_WORKER) > void establishWorkerContextConnectionToNetworkProcess(NetworkProcessProxy&, WebCore::SecurityOriginData&&, std::optional<PAL::SessionID>); > ServiceWorkerProcessProxy* serviceWorkerProcessProxyFromPageID(uint64_t pageID) const; >@@ -644,6 +664,9 @@ private: > bool m_canHandleHTTPSServerTrustEvaluation { true }; > bool m_didNetworkProcessCrash { false }; > std::unique_ptr<NetworkProcessProxy> m_networkProcess; >+#if ENABLE(PAYMENT_PROCESS) >+ std::unique_ptr<PaymentProcessProxy> m_paymentProcess; >+#endif // ENABLE(PAYMENT_PROCESS) > > HashMap<uint64_t, RefPtr<DictionaryCallback>> m_dictionaryCallbacks; > HashMap<uint64_t, RefPtr<StatisticsRequest>> m_statisticsRequests; >@@ -745,6 +768,22 @@ void WebProcessPool::sendToNetworkingProcessRelaunchingIfNecessary(T&& message) > m_networkProcess->send(std::forward<T>(message), 0); > } > >+#if ENABLE(PAYMENT_PROCESS) >+template<typename T> >+void WebProcessPool::sendToPaymentProcess(T&& message) >+{ >+ if (m_paymentProcess && m_paymentProcess->canSendMessage()) >+ m_paymentProcess->send(std::forward<T>(message), 0); >+} >+ >+template<typename T> >+void WebProcessPool::sendToPaymentProcessRelaunchingIfNecessary(T&& message) >+{ >+ ensurePaymentProcess(); >+ m_paymentProcess->send(std::forward<T>(message), 0); >+} >+#endif // ENABLE(PAYMENT_PROCESS) >+ > template<typename T> > void WebProcessPool::sendToAllProcesses(const T& message) > { >diff --git a/Source/WebKit/UIProcess/WebProcessProxy.cpp b/Source/WebKit/UIProcess/WebProcessProxy.cpp >index dd567f8b73cc064f36cac62d6d47ade3c93684c1..5cf1c5a486ccb75509f5ff55067d7072abf95f7e 100644 >--- a/Source/WebKit/UIProcess/WebProcessProxy.cpp >+++ b/Source/WebKit/UIProcess/WebProcessProxy.cpp >@@ -631,6 +631,12 @@ void WebProcessProxy::getNetworkProcessConnection(Messages::WebProcessProxy::Get > { > m_processPool->getNetworkProcessConnection(*this, WTFMove(reply)); > } >+#if ENABLE(PAYMENT_PROCESS) >+void WebProcessProxy::getPaymentProcessConnection(PAL::SessionID initialSessionID, Messages::WebProcessProxy::GetPaymentProcessConnection::DelayedReply&& reply) >+{ >+ m_processPool->getPaymentProcessConnection(*this, initialSessionID, WTFMove(reply)); >+} >+#endif // ENABLE(PAYMENT_PROCESS) > > #if !PLATFORM(COCOA) > bool WebProcessProxy::platformIsBeingDebugged() const >diff --git a/Source/WebKit/UIProcess/WebProcessProxy.h b/Source/WebKit/UIProcess/WebProcessProxy.h >index 2361ae773a77efecbfa5649aee762e596e7bda97..229eea377fb5c7a1e7b20659c881c58bc7f4fc7c 100644 >--- a/Source/WebKit/UIProcess/WebProcessProxy.h >+++ b/Source/WebKit/UIProcess/WebProcessProxy.h >@@ -290,6 +290,9 @@ private: > #endif > void getNetworkProcessConnection(Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply&&); > >+#if ENABLE(PAYMENT_PROCESS) >+ void getPaymentProcessConnection(PAL::SessionID initialSessionID, Messages::WebProcessProxy::GetPaymentProcessConnection::DelayedReply&&); >+#endif // ENABLE(PAYMENT_PROCESS) > bool platformIsBeingDebugged() const; > bool shouldAllowNonValidInjectedCode() const; > >diff --git a/Source/WebKit/UIProcess/WebProcessProxy.messages.in b/Source/WebKit/UIProcess/WebProcessProxy.messages.in >index 6a98f4e96047dabf164a7610a87f2a9f6860b48a..8f5e1d6660b150d75730a63e1f093d43f6a36d27 100644 >--- a/Source/WebKit/UIProcess/WebProcessProxy.messages.in >+++ b/Source/WebKit/UIProcess/WebProcessProxy.messages.in >@@ -37,6 +37,9 @@ messages -> WebProcessProxy LegacyReceiver { > GetPluginProcessConnection(uint64_t pluginProcessToken) -> (IPC::Attachment connectionHandle, bool supportsAsynchronousInitialization) Delayed > #endif > GetNetworkProcessConnection() -> (IPC::Attachment connectionHandle) Delayed >+#if ENABLE(PAYMENT_PROCESS) >+ GetPaymentProcessConnection(PAL::SessionID initialSessionID) -> (IPC::Attachment connectionHandle) Delayed >+#endif // ENABLE(PAYMENT_PROCESS) > ProcessReadyToSuspend() > DidCancelProcessSuspension() > >diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp >index 14960d3380ff93e5643f2ba93faa3f60cc2aa34a..b97b9f920de9b5a50e714d4e5b94ed7e480ae0f1 100644 >--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp >+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp >@@ -58,6 +58,10 @@ > #include "PluginProcessManager.h" > #endif > >+#if ENABLE(PAYMENT_PROCESS) >+#include "PaymentProcessMessages.h" >+#endif // ENABLE(PAYMENT_PROCESS) >+ > #if HAVE(SEC_KEY_PROXY) > #include "SecKeyProxyStore.h" > #endif >@@ -132,6 +136,9 @@ WebsiteDataStore::~WebsiteDataStore() > ASSERT(nonDefaultDataStores().get(m_sessionID) == this); > nonDefaultDataStores().remove(m_sessionID); > for (auto& processPool : WebProcessPool::allProcessPools()) { >+#if ENABLE(PAYMENT_PROCESS) >+ destroyPaymentProcessSession(processPool); >+#endif > if (auto* networkProcess = processPool->networkProcess()) > networkProcess->removeSession(m_sessionID); > } >@@ -1319,6 +1326,13 @@ void WebsiteDataStore::removeAllStorageAccessHandler(CompletionHandler<void()>&& > } > } > >+void WebsiteDataStore::destroyPaymentProcessSession(WebProcessPool* pool) >+{ >+#if ENABLE(PAYMENT_PROCESS) >+ pool->sendToPaymentProcess(Messages::PaymentProcess::DestroySession(m_sessionID)); >+#endif // ENABLE(PAYMENT_PROCESS) >+} >+ > void WebsiteDataStore::removePrevalentDomains(const Vector<String>& domains) > { > for (auto& processPool : processPools()) >diff --git a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h >index 40f575aba4c290f78c531bfb5a9d047a94d79d7f..7a09071cc61c2d9efa114883e2ce7eafafe5abb9 100644 >--- a/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h >+++ b/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h >@@ -148,6 +148,7 @@ public: > bool isAssociatedProcessPool(WebProcessPool&) const; > > WebsiteDataStoreParameters parameters(); >+ void destroyPaymentProcessSession(WebProcessPool*); > > Vector<WebCore::Cookie> pendingCookies() const; > void addPendingCookie(const WebCore::Cookie&); >diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >index ffb8f95036b852b7854c494f4420ba958a1282d5..75ac6e554056570919631a05504dcedd8657b4c2 100644 >--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj >+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >@@ -849,6 +849,7 @@ > 37F90DE31376560E0051CF68 /* HTTPCookieAcceptPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = F638954F133BEF38008941D5 /* HTTPCookieAcceptPolicy.h */; }; > 37FC19471850FBF2008CFA47 /* WKBrowsingContextLoadDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 37FC19461850FBF2008CFA47 /* WKBrowsingContextLoadDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 37FC194B18510D6A008CFA47 /* WKNSURLAuthenticationChallenge.h in Headers */ = {isa = PBXBuildFile; fileRef = 37FC194918510D6A008CFA47 /* WKNSURLAuthenticationChallenge.h */; }; >+ 391360252193C1430056492A /* com.apple.WebKit.Payments.sb in Resources */ = {isa = PBXBuildFile; fileRef = 391360242193C1430056492A /* com.apple.WebKit.Payments.sb */; }; > 3F418EF91887BD97002795FD /* VideoFullscreenManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F418EF51887BD97002795FD /* VideoFullscreenManagerMessageReceiver.cpp */; }; > 3F418EFB1887BD97002795FD /* VideoFullscreenManagerProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F418EF71887BD97002795FD /* VideoFullscreenManagerProxyMessageReceiver.cpp */; }; > 3F87B9BE158940190090FF62 /* WebColorChooser.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F87B9BB15893F630090FF62 /* WebColorChooser.h */; }; >@@ -908,6 +909,10 @@ > 510F59111DDE297000412FF5 /* _WKLinkIconParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 51C0C9791DDD78540032CAD3 /* _WKLinkIconParameters.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 510FBB9B1288C95E00AFFDF4 /* WebContextMenuItemData.h in Headers */ = {isa = PBXBuildFile; fileRef = 510FBB991288C95E00AFFDF4 /* WebContextMenuItemData.h */; }; > 5110AE0D133C16CB0072717A /* WKIconDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 5110AE0B133C16CB0072717A /* WKIconDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 5118E9A81F295977003EF9F5 /* PaymentProcessMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5118E9A51F295963003EF9F5 /* PaymentProcessMessageReceiver.cpp */; }; >+ 5118E9A91F295977003EF9F5 /* PaymentProcessMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 5118E9A61F295963003EF9F5 /* PaymentProcessMessages.h */; }; >+ 5118E9AA1F295977003EF9F5 /* PaymentProcessProxyMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5118E9A71F295963003EF9F5 /* PaymentProcessProxyMessageReceiver.cpp */; }; >+ 5118E9AB1F295977003EF9F5 /* PaymentProcessProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 5118E9A21F295963003EF9F5 /* PaymentProcessProxyMessages.h */; }; > 511F7D411EB1BCF500E47B83 /* WebsiteDataStoreParameters.h in Headers */ = {isa = PBXBuildFile; fileRef = 511F7D401EB1BCEE00E47B83 /* WebsiteDataStoreParameters.h */; }; > 511F8A7B138B460900A95F44 /* SecItemShimLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = 511F8A77138B460900A95F44 /* SecItemShimLibrary.h */; }; > 511F8A81138B485D00A95F44 /* SecItemShimLibrary.mm in Sources */ = {isa = PBXBuildFile; fileRef = 511F8A78138B460900A95F44 /* SecItemShimLibrary.mm */; }; >@@ -959,6 +964,7 @@ > 517CF0E3163A486C00C2950E /* NetworkProcessConnectionMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517CF0E1163A486C00C2950E /* NetworkProcessConnectionMessageReceiver.cpp */; }; > 517CF0E3163A486C00C2950F /* CacheStorageEngineConnectionMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517CF0E1163A486C00C2950F /* CacheStorageEngineConnectionMessageReceiver.cpp */; }; > 517CF0E4163A486C00C2950E /* NetworkProcessConnectionMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 517CF0E2163A486C00C2950E /* NetworkProcessConnectionMessages.h */; }; >+ 517DD5BF180DA7D30081660B /* PaymentProcessProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 517DD5BD180DA7D30081660B /* PaymentProcessProxy.h */; }; > 51871B5C127CB89D00F76232 /* WebContextMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = 51871B5A127CB89D00F76232 /* WebContextMenu.h */; }; > 518ACAEA12AEE6BB00B04B83 /* WKProtectionSpaceTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 518ACAE912AEE6BB00B04B83 /* WKProtectionSpaceTypes.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 518ACF1112B015F800B04B83 /* WKCredentialTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 518ACF1012B015F800B04B83 /* WKCredentialTypes.h */; settings = {ATTRIBUTES = (Private, ); }; }; >@@ -986,6 +992,8 @@ > 51DD9F2816367DA2001578E9 /* NetworkConnectionToWebProcessMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51DD9F2616367DA2001578E9 /* NetworkConnectionToWebProcessMessageReceiver.cpp */; }; > 51DD9F2916367DA2001578E9 /* NetworkConnectionToWebProcessMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 51DD9F2716367DA2001578E9 /* NetworkConnectionToWebProcessMessages.h */; }; > 51E351CB180F2CCC00E53BE9 /* IDBUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E351C9180F2CCC00E53BE9 /* IDBUtilities.h */; }; >+ 51E351FF180F5D0F00E53BE9 /* PaymentProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E351FA180F5D0B00E53BE9 /* PaymentProcess.cpp */; }; >+ 51E35200180F5D0F00E53BE9 /* PaymentToWebProcessConnection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51E351FD180F5D0B00E53BE9 /* PaymentToWebProcessConnection.cpp */; }; > 51E6C1641F2935DD00FD3437 /* ResourceLoadStatisticsPersistentStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 51E6C1611F2935CD00FD3437 /* ResourceLoadStatisticsPersistentStorage.h */; }; > 51EFC1CF1524E62500C9A938 /* WKBundleDOMWindowExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FA2D541521118600C1BA0B /* WKBundleDOMWindowExtension.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 51F060E01654317F00F3281B /* WebResourceLoaderMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F060DE1654317500F3281B /* WebResourceLoaderMessages.h */; }; >@@ -1568,6 +1576,7 @@ > D3B9484711FF4B6500032B39 /* WebPopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = D3B9484311FF4B6500032B39 /* WebPopupMenu.h */; }; > D3B9484911FF4B6500032B39 /* WebSearchPopupMenu.h in Headers */ = {isa = PBXBuildFile; fileRef = D3B9484511FF4B6500032B39 /* WebSearchPopupMenu.h */; }; > E105FE5418D7B9DE008F57A8 /* EditingRange.h in Headers */ = {isa = PBXBuildFile; fileRef = E105FE5318D7B9DE008F57A8 /* EditingRange.h */; }; >+ E115C714190F89E400ECC516 /* PaymentProcessIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = E1FEF39C190F791C00731658 /* PaymentProcessIOS.mm */; }; > 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 */; }; >@@ -2984,6 +2993,11 @@ > 37FC19461850FBF2008CFA47 /* WKBrowsingContextLoadDelegatePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBrowsingContextLoadDelegatePrivate.h; sourceTree = "<group>"; }; > 37FC194818510D6A008CFA47 /* WKNSURLAuthenticationChallenge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKNSURLAuthenticationChallenge.mm; sourceTree = "<group>"; }; > 37FC194918510D6A008CFA47 /* WKNSURLAuthenticationChallenge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKNSURLAuthenticationChallenge.h; sourceTree = "<group>"; }; >+ 391360242193C1430056492A /* com.apple.WebKit.Payments.sb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = com.apple.WebKit.Payments.sb; sourceTree = "<group>"; }; >+ 392E942B219A399A0050F982 /* WebToPaymentProcessConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebToPaymentProcessConnection.h; sourceTree = "<group>"; }; >+ 392E942D219A399A0050F982 /* WebToPaymentProcessConnection.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebToPaymentProcessConnection.cpp; sourceTree = "<group>"; }; >+ 39BD0AF521AE202E00E3243F /* Info-iOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = "<group>"; }; >+ 39BD0AF621AE202E00E3243F /* PaymentServiceEntryPoint.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = PaymentServiceEntryPoint.mm; sourceTree = "<group>"; }; > 3F418EF51887BD97002795FD /* VideoFullscreenManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VideoFullscreenManagerMessageReceiver.cpp; path = DerivedSources/WebKit2/VideoFullscreenManagerMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; > 3F418EF61887BD97002795FD /* VideoFullscreenManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VideoFullscreenManagerMessages.h; path = DerivedSources/WebKit2/VideoFullscreenManagerMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; > 3F418EF71887BD97002795FD /* VideoFullscreenManagerProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VideoFullscreenManagerProxyMessageReceiver.cpp; path = DerivedSources/WebKit2/VideoFullscreenManagerProxyMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; >@@ -3111,6 +3125,7 @@ > 4F601430155C5A32001FBDE0 /* BlockingResponseMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlockingResponseMap.h; sourceTree = "<group>"; }; > 510031F61379CACB00C8DFE4 /* SecItemShim.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = SecItemShim.dylib; sourceTree = BUILT_PRODUCTS_DIR; }; > 51021E9B12B16788005C033C /* WebContextMenuClientMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContextMenuClientMac.mm; sourceTree = "<group>"; }; >+ 51032F1A180F74F100961BB7 /* PaymentToWebProcessConnection.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = PaymentToWebProcessConnection.messages.in; sourceTree = "<group>"; }; > 5104F5A11F19D7CF004CF821 /* CookieStorageUtilsCF.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CookieStorageUtilsCF.mm; sourceTree = "<group>"; }; > 510523711C73D22B007993CB /* WebIDBConnectionToServer.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebIDBConnectionToServer.messages.in; sourceTree = "<group>"; }; > 510523721C73D37B007993CB /* WebIDBConnectionToServerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebIDBConnectionToServerMessageReceiver.cpp; path = DerivedSources/WebKit2/WebIDBConnectionToServerMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; >@@ -3134,11 +3149,15 @@ > 5110AE0A133C16CB0072717A /* WKIconDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKIconDatabase.cpp; sourceTree = "<group>"; }; > 5110AE0B133C16CB0072717A /* WKIconDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKIconDatabase.h; sourceTree = "<group>"; }; > 5118E9A21F295963003EF9F5 /* StorageProcessProxyMessages.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StorageProcessProxyMessages.h; path = DerivedSources/WebKit2/StorageProcessProxyMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; >+ 5118E9A21F295963003EF9F5 /* PaymentProcessProxyMessages.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaymentProcessProxyMessages.h; sourceTree = "<group>"; }; > 5118E9A31F295963003EF9F5 /* StorageToWebProcessConnectionMessageReceiver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = StorageToWebProcessConnectionMessageReceiver.cpp; path = DerivedSources/WebKit2/StorageToWebProcessConnectionMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; > 5118E9A41F295963003EF9F5 /* StorageToWebProcessConnectionMessages.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StorageToWebProcessConnectionMessages.h; path = DerivedSources/WebKit2/StorageToWebProcessConnectionMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; > 5118E9A51F295963003EF9F5 /* StorageProcessMessageReceiver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = StorageProcessMessageReceiver.cpp; path = DerivedSources/WebKit2/StorageProcessMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; > 5118E9A61F295963003EF9F5 /* StorageProcessMessages.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = StorageProcessMessages.h; path = DerivedSources/WebKit2/StorageProcessMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; > 5118E9A71F295963003EF9F5 /* StorageProcessProxyMessageReceiver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = StorageProcessProxyMessageReceiver.cpp; path = DerivedSources/WebKit2/StorageProcessProxyMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; >+ 5118E9A51F295963003EF9F5 /* PaymentProcessMessageReceiver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PaymentProcessMessageReceiver.cpp; sourceTree = "<group>"; }; >+ 5118E9A61F295963003EF9F5 /* PaymentProcessMessages.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaymentProcessMessages.h; sourceTree = "<group>"; }; >+ 5118E9A71F295963003EF9F5 /* PaymentProcessProxyMessageReceiver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PaymentProcessProxyMessageReceiver.cpp; sourceTree = "<group>"; }; > 511F7D3F1EB1BCEE00E47B83 /* WebsiteDataStoreParameters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebsiteDataStoreParameters.cpp; sourceTree = "<group>"; }; > 511F7D401EB1BCEE00E47B83 /* WebsiteDataStoreParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebsiteDataStoreParameters.h; sourceTree = "<group>"; }; > 511F8A77138B460900A95F44 /* SecItemShimLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SecItemShimLibrary.h; path = ../../WebProcess/mac/SecItemShimLibrary.h; sourceTree = "<group>"; }; >@@ -3156,6 +3175,7 @@ > 512935D61288D19400A4B695 /* WebContextMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextMenuItem.h; sourceTree = "<group>"; }; > 512935E11288D97800A4B695 /* InjectedBundlePageContextMenuClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageContextMenuClient.cpp; sourceTree = "<group>"; }; > 512935E21288D97800A4B695 /* InjectedBundlePageContextMenuClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePageContextMenuClient.h; sourceTree = "<group>"; }; >+ 512A9766180E05D20039A149 /* PaymentProcessProxy.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = PaymentProcessProxy.messages.in; sourceTree = "<group>"; }; > 512F588E12A8838800629530 /* AuthenticationChallengeProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuthenticationChallengeProxy.cpp; sourceTree = "<group>"; }; > 512F588F12A8838800629530 /* AuthenticationChallengeProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AuthenticationChallengeProxy.h; sourceTree = "<group>"; }; > 512F589012A8838800629530 /* AuthenticationDecisionListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuthenticationDecisionListener.cpp; sourceTree = "<group>"; }; >@@ -3226,6 +3246,8 @@ > 517CF0E1163A486C00C2950E /* NetworkProcessConnectionMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkProcessConnectionMessageReceiver.cpp; path = DerivedSources/WebKit2/NetworkProcessConnectionMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; > 517CF0E1163A486C00C2950F /* CacheStorageEngineConnectionMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CacheStorageEngineConnectionMessageReceiver.cpp; path = DerivedSources/WebKit2/CacheStorageEngineConnectionMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; > 517CF0E2163A486C00C2950E /* NetworkProcessConnectionMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkProcessConnectionMessages.h; path = DerivedSources/WebKit2/NetworkProcessConnectionMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; >+ 517DD5BC180DA7D30081660B /* PaymentProcessProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PaymentProcessProxy.cpp; sourceTree = "<group>"; }; >+ 517DD5BD180DA7D30081660B /* PaymentProcessProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PaymentProcessProxy.h; sourceTree = "<group>"; }; > 5183B3931379F85C00E8754E /* Shim.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shim.xcconfig; sourceTree = "<group>"; }; > 51871B59127CB89D00F76232 /* WebContextMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebContextMenu.cpp; sourceTree = "<group>"; }; > 51871B5A127CB89D00F76232 /* WebContextMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextMenu.h; sourceTree = "<group>"; }; >@@ -3245,6 +3267,7 @@ > 51A55600128C6D92009ABCEC /* WKContextMenuItemTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuItemTypes.h; sourceTree = "<group>"; }; > 51A5877E1D1C4CB9004BA9AF /* WebIDBResult.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebIDBResult.cpp; sourceTree = "<group>"; }; > 51A5877F1D1C4CB9004BA9AF /* WebIDBResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIDBResult.h; sourceTree = "<group>"; }; >+ 51A60B29180CCD9000F3BF50 /* PaymentService.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = PaymentService.xcconfig; sourceTree = "<group>"; }; > 51A728DC1B1BAD2D00102EEE /* WKBundleNavigationActionPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKBundleNavigationActionPrivate.h; sourceTree = "<group>"; }; > 51A7F2F2125BF820008AEB1D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Logging.h; sourceTree = "<group>"; }; > 51A7F2F4125BF8D4008AEB1D /* Logging.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Logging.cpp; sourceTree = "<group>"; }; >@@ -3304,6 +3327,11 @@ > 51DD9F2716367DA2001578E9 /* NetworkConnectionToWebProcessMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkConnectionToWebProcessMessages.h; path = DerivedSources/WebKit2/NetworkConnectionToWebProcessMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; > 51E351C8180F2CCC00E53BE9 /* IDBUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBUtilities.cpp; sourceTree = "<group>"; }; > 51E351C9180F2CCC00E53BE9 /* IDBUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBUtilities.h; sourceTree = "<group>"; }; >+ 51E351FA180F5D0B00E53BE9 /* PaymentProcess.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PaymentProcess.cpp; sourceTree = "<group>"; }; >+ 51E351FB180F5D0B00E53BE9 /* PaymentProcess.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaymentProcess.h; sourceTree = "<group>"; }; >+ 51E351FC180F5D0B00E53BE9 /* PaymentProcess.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = PaymentProcess.messages.in; sourceTree = "<group>"; }; >+ 51E351FD180F5D0B00E53BE9 /* PaymentToWebProcessConnection.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PaymentToWebProcessConnection.cpp; sourceTree = "<group>"; }; >+ 51E351FE180F5D0B00E53BE9 /* PaymentToWebProcessConnection.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PaymentToWebProcessConnection.h; sourceTree = "<group>"; }; > 51E399051D6F54C5009C8831 /* UIGamepadProviderCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIGamepadProviderCocoa.mm; sourceTree = "<group>"; }; > 51E6C15F1F29355100FD3437 /* ResourceLoadStatisticsPersistentStorageIOS.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = ResourceLoadStatisticsPersistentStorageIOS.mm; path = ios/ResourceLoadStatisticsPersistentStorageIOS.mm; sourceTree = "<group>"; }; > 51E6C1611F2935CD00FD3437 /* ResourceLoadStatisticsPersistentStorage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ResourceLoadStatisticsPersistentStorage.h; sourceTree = "<group>"; }; >@@ -4452,6 +4480,7 @@ > E1E552C316AE065E004ED653 /* SandboxInitializationParameters.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SandboxInitializationParameters.h; sourceTree = "<group>"; }; > E1EE53DC11F8CF9F00CCBEE4 /* InjectedBundlePageEditorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePageEditorClient.h; sourceTree = "<group>"; }; > E1EE53E611F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageEditorClient.cpp; sourceTree = "<group>"; }; >+ E1FEF39C190F791C00731658 /* PaymentProcessIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PaymentProcessIOS.mm; sourceTree = "<group>"; }; > E413F59B1AC1ADB600345360 /* NetworkCacheEntry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkCacheEntry.h; sourceTree = "<group>"; }; > E413F59E1AC1AF9D00345360 /* NetworkCacheEntry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkCacheEntry.cpp; sourceTree = "<group>"; }; > E42E060B1AA7440D00B11699 /* NetworkCacheIOChannel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkCacheIOChannel.h; sourceTree = "<group>"; }; >@@ -4626,6 +4655,7 @@ > 1A1D2116191D995C0001619F /* postprocess-framework-headers.sh */, > BC2E6E74114196F000A63B1E /* Platform */, > 1AADDF4B10D82AF000D3D63D /* Shared */, >+ 51F7DC0A180CC41100212CA3 /* PaymentProcess */, > BC032DC310F438260058C15A /* UIProcess */, > BC032D5C10F436D50058C15A /* WebProcess */, > 510CC7DA16138E0100D03ED3 /* NetworkProcess */, >@@ -4831,6 +4861,7 @@ > 41D0FC7D20E43A5100076AE8 /* Network-OSX-sandbox.entitlements */, > 5C7ACFD1218DD8BD004CBB59 /* Network-OSX.entitlements */, > BC8283AB16B4BEAD00A278FE /* NetworkService.xcconfig */, >+ 51A60B29180CCD9000F3BF50 /* PaymentService.xcconfig */, > A1EDD2DB1884B96400BBFE98 /* PluginProcessShim.xcconfig */, > BC8283F216B4FC5300A278FE /* PluginService.32.xcconfig */, > BC8283F416B4FC5300A278FE /* PluginService.64.xcconfig */, >@@ -6284,6 +6315,48 @@ > path = Resources/mac; > sourceTree = "<group>"; > }; >+ 392E942A219A2E850050F982 /* Payments */ = { >+ isa = PBXGroup; >+ children = ( >+ 392E942D219A399A0050F982 /* WebToPaymentProcessConnection.cpp */, >+ 392E942B219A399A0050F982 /* WebToPaymentProcessConnection.h */, >+ ); >+ path = Payments; >+ sourceTree = "<unknown>"; >+ }; >+ 39BD0AF121AE202E00E3243F /* EntryPoint */ = { >+ isa = PBXGroup; >+ children = ( >+ 39BD0AF221AE202E00E3243F /* ios */, >+ ); >+ path = EntryPoint; >+ sourceTree = "<group>"; >+ }; >+ 39BD0AF221AE202E00E3243F /* ios */ = { >+ isa = PBXGroup; >+ children = ( >+ 39BD0AF321AE202E00E3243F /* XPCService */, >+ ); >+ path = ios; >+ sourceTree = "<group>"; >+ }; >+ 39BD0AF321AE202E00E3243F /* XPCService */ = { >+ isa = PBXGroup; >+ children = ( >+ 39BD0AF421AE202E00E3243F /* PaymentService */, >+ 39BD0AF621AE202E00E3243F /* PaymentServiceEntryPoint.mm */, >+ ); >+ path = XPCService; >+ sourceTree = "<group>"; >+ }; >+ 39BD0AF421AE202E00E3243F /* PaymentService */ = { >+ isa = PBXGroup; >+ children = ( >+ 39BD0AF521AE202E00E3243F /* Info-iOS.plist */, >+ ); >+ path = PaymentService; >+ sourceTree = "<group>"; >+ }; > 413075971DE84ED70039EC69 /* webrtc */ = { > isa = PBXGroup; > children = ( >@@ -6604,6 +6677,16 @@ > name = mac; > sourceTree = "<group>"; > }; >+ 517DD5BB180DA7C40081660B /* Payments */ = { >+ isa = PBXGroup; >+ children = ( >+ 517DD5BC180DA7D30081660B /* PaymentProcessProxy.cpp */, >+ 517DD5BD180DA7D30081660B /* PaymentProcessProxy.h */, >+ 512A9766180E05D20039A149 /* PaymentProcessProxy.messages.in */, >+ ); >+ path = Payments; >+ sourceTree = "<group>"; >+ }; > 518E8EF116B208F000E91429 /* Authentication */ = { > isa = PBXGroup; > children = ( >@@ -6660,6 +6743,42 @@ > path = ios; > sourceTree = "<group>"; > }; >+ 51F7DC0A180CC41100212CA3 /* PaymentProcess */ = { >+ isa = PBXGroup; >+ children = ( >+ 39BD0AF121AE202E00E3243F /* EntryPoint */, >+ E1FEF39B190F791C00731658 /* ios */, >+ 51E351FA180F5D0B00E53BE9 /* PaymentProcess.cpp */, >+ 51E351FB180F5D0B00E53BE9 /* PaymentProcess.h */, >+ 51E351FC180F5D0B00E53BE9 /* PaymentProcess.messages.in */, >+ 51E351FD180F5D0B00E53BE9 /* PaymentToWebProcessConnection.cpp */, >+ 51E351FE180F5D0B00E53BE9 /* PaymentToWebProcessConnection.h */, >+ 51032F1A180F74F100961BB7 /* PaymentToWebProcessConnection.messages.in */, >+ ); >+ path = PaymentProcess; >+ sourceTree = "<group>"; >+ }; >+ 539BD5B21DADB0BA00F2E4E1 /* capture */ = { >+ isa = PBXGroup; >+ children = ( >+ 53DEA3651DDE422E00E82648 /* json.hpp */, >+ 530258301DCBBD1D00DA89C2 /* NetworkCaptureEvent.cpp */, >+ 530258311DCBBD1D00DA89C2 /* NetworkCaptureEvent.h */, >+ 530258321DCBBD1D00DA89C2 /* NetworkCaptureLogging.h */, >+ 530258331DCBBD1D00DA89C2 /* NetworkCaptureManager.cpp */, >+ 530258341DCBBD1D00DA89C2 /* NetworkCaptureManager.h */, >+ 530258351DCBBD1D00DA89C2 /* NetworkCaptureRecorder.cpp */, >+ 530258361DCBBD1D00DA89C2 /* NetworkCaptureRecorder.h */, >+ 530258371DCBBD1D00DA89C2 /* NetworkCaptureReplayer.cpp */, >+ 530258381DCBBD1D00DA89C2 /* NetworkCaptureReplayer.h */, >+ 5302582E1DCBBD1D00DA89C2 /* NetworkCaptureResource.cpp */, >+ 5302582F1DCBBD1D00DA89C2 /* NetworkCaptureResource.h */, >+ 530258391DCBBD1D00DA89C2 /* NetworkDataTaskReplay.cpp */, >+ 5302583A1DCBBD1D00DA89C2 /* NetworkDataTaskReplay.h */, >+ ); >+ path = capture; >+ sourceTree = "<group>"; >+ }; > 570AB8F620AE81AB00B8BE87 /* cocoa */ = { > isa = PBXGroup; > children = ( >@@ -7064,6 +7183,7 @@ > isa = PBXGroup; > children = ( > A78CCDD8193AC9E3005ECC25 /* com.apple.WebKit.Networking.sb */, >+ 391360242193C1430056492A /* com.apple.WebKit.Payments.sb */, > A78CCDD7193AC9E3005ECC25 /* com.apple.WebKit.Storage.sb */, > A78CCDD9193AC9E3005ECC25 /* com.apple.WebKit.WebContent.sb */, > ); >@@ -7112,6 +7232,7 @@ > 4A410F4119AF7B27002EBAB5 /* MediaStream */, > 5105B0D2162F7A5E00E27709 /* Network */, > 31099974146C8AA80029DEB9 /* Notifications (User) */, >+ 392E942A219A2E850050F982 /* Payments */, > 1A6FB7AA11E64B4900DB1371 /* Plugins */, > 5118E9981F295259003EF9F5 /* Storage */, > 1AAF08AA1926930B00B6390C /* UserContent */, >@@ -7274,6 +7395,7 @@ > BCCF085C113F3B7500C650C5 /* mac */, > 510CC7E716138E7200D03ED3 /* Network */, > 31A2EC401489973700810D71 /* Notifications */, >+ 517DD5BB180DA7C40081660B /* Payments */, > 1AEFCC0511D01F34008219D3 /* Plugins */, > 2D1551A91F5A9B420006E3FE /* RemoteLayerTree */, > 1AAF089E192681AC00B6390C /* UserContent */, >@@ -8372,6 +8494,10 @@ > 5C0B17751E7C879C00E9123C /* NetworkSocketStreamMessages.h */, > 1A2D8437127F65D5001EB962 /* NPObjectMessageReceiverMessageReceiver.cpp */, > 1A2D8438127F65D5001EB962 /* NPObjectMessageReceiverMessages.h */, >+ 5118E9A51F295963003EF9F5 /* PaymentProcessMessageReceiver.cpp */, >+ 5118E9A61F295963003EF9F5 /* PaymentProcessMessages.h */, >+ 5118E9A71F295963003EF9F5 /* PaymentProcessProxyMessageReceiver.cpp */, >+ 5118E9A21F295963003EF9F5 /* PaymentProcessProxyMessages.h */, > CDA29A241CBEB67A00901CCF /* PlaybackSessionManagerMessageReceiver.cpp */, > CDA29A251CBEB67A00901CCF /* PlaybackSessionManagerMessages.h */, > CDA29A261CBEB67A00901CCF /* PlaybackSessionManagerProxyMessageReceiver.cpp */, >@@ -8692,6 +8818,14 @@ > name = PDF; > sourceTree = "<group>"; > }; >+ E1FEF39B190F791C00731658 /* ios */ = { >+ isa = PBXGroup; >+ children = ( >+ E1FEF39C190F791C00731658 /* PaymentProcessIOS.mm */, >+ ); >+ path = ios; >+ sourceTree = "<group>"; >+ }; > E489D2821A0A2BE80078C06A /* cache */ = { > isa = PBXGroup; > children = ( >@@ -9156,6 +9290,9 @@ > 1AC7537C183A9FDB0072CB15 /* PageLoadState.h in Headers */, > 1A8B66B01BC43C860082DF77 /* PageLoadStateObserver.h in Headers */, > C574A58112E66681002DFE98 /* PasteboardTypes.h in Headers */, >+ 5118E9A91F295977003EF9F5 /* PaymentProcessMessages.h in Headers */, >+ 517DD5BF180DA7D30081660B /* PaymentProcessProxy.h in Headers */, >+ 5118E9AB1F295977003EF9F5 /* PaymentProcessProxyMessages.h in Headers */, > C1E123BA20A11573002646F4 /* PDFContextMenu.h in Headers */, > E19582D3153CBFD700B60875 /* PDFKitImports.h in Headers */, > 2D6BF12421AF56E1001E79C9 /* PencilKitSoftLink.h in Headers */, >@@ -10153,6 +10290,7 @@ > buildActionMask = 2147483647; > files = ( > E17AE2C316B9C63A001C42F1 /* com.apple.WebKit.NetworkProcess.sb in Resources */, >+ 391360252193C1430056492A /* com.apple.WebKit.Payments.sb in Resources */, > E11D35AE16B63D1B006D23D7 /* com.apple.WebProcess.sb in Resources */, > 414DD37920BF43F5006959FB /* com.cisco.webex.plugin.gpc64.sb in Resources */, > 6BE969C11E54D452008B7483 /* corePrediction_model in Resources */, >@@ -10759,6 +10897,11 @@ > 2D913447212CF9F000128AFD /* NPRuntimeObjectMap.cpp in Sources */, > 2D913448212CF9F000128AFD /* NPRuntimeUtilities.cpp in Sources */, > 2D92A794212B6AD400F493FD /* NPVariantData.cpp in Sources */, >+ 51E351FF180F5D0F00E53BE9 /* PaymentProcess.cpp in Sources */, >+ E115C714190F89E400ECC516 /* PaymentProcessIOS.mm in Sources */, >+ 5118E9A81F295977003EF9F5 /* PaymentProcessMessageReceiver.cpp in Sources */, >+ 5118E9AA1F295977003EF9F5 /* PaymentProcessProxyMessageReceiver.cpp in Sources */, >+ 51E35200180F5D0F00E53BE9 /* PaymentToWebProcessConnection.cpp in Sources */, > CDA29A281CBEB67A00901CCF /* PlaybackSessionManagerMessageReceiver.cpp in Sources */, > CDA29A2A1CBEB67A00901CCF /* PlaybackSessionManagerProxyMessageReceiver.cpp in Sources */, > 2D913449212CF9F000128AFD /* Plugin.cpp in Sources */, >diff --git a/Source/WebKit/WebProcess/Payments/WebToPaymentProcessConnection.cpp b/Source/WebKit/WebProcess/Payments/WebToPaymentProcessConnection.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..a6d0a7b5692b119fc67f427dd479ee18d38163c0 >--- /dev/null >+++ b/Source/WebKit/WebProcess/Payments/WebToPaymentProcessConnection.cpp >@@ -0,0 +1,74 @@ >+/* >+ * Copyright (C) 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. ``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 >+ * 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. >+ * >+ */ >+#if ENABLE(PAYMENT_PROCESS) >+ >+#include "config.h" >+#include "WebToPaymentProcessConnection.h" >+ >+ >+#include "WebProcess.h" >+ >+#include <WebCore/SWContextManager.h> >+ >+namespace WebKit { >+using namespace PAL; >+using namespace WebCore; >+ >+WebToPaymentProcessConnection::WebToPaymentProcessConnection(IPC::Connection::Identifier connectionIdentifier) >+ : m_connection(IPC::Connection::createClientConnection(connectionIdentifier, *this)) >+{ >+ m_connection->open(); >+} >+ >+WebToPaymentProcessConnection::~WebToPaymentProcessConnection() >+{ >+ m_connection->invalidate(); >+} >+ >+void WebToPaymentProcessConnection::didReceiveMessage(IPC::Connection& connection, IPC::Decoder& decoder) >+{ >+ ASSERT_NOT_REACHED(); >+} >+ >+void WebToPaymentProcessConnection::didReceiveSyncMessage(IPC::Connection& connection, IPC::Decoder& decoder, std::unique_ptr<IPC::Encoder>& replyEncoder) >+{ >+ >+ ASSERT_NOT_REACHED(); >+} >+ >+void WebToPaymentProcessConnection::didClose(IPC::Connection& connection) >+{ >+ auto protectedThis = makeRef(*this); >+ >+ WebProcess::singleton().webToPaymentProcessConnectionClosed(this); >+} >+ >+void WebToPaymentProcessConnection::didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) >+{ >+} >+ >+} // namespace WebKit >+#endif // ENABLE(PAYMENT_PROCESS) >diff --git a/Source/WebKit/WebProcess/Payments/WebToPaymentProcessConnection.h b/Source/WebKit/WebProcess/Payments/WebToPaymentProcessConnection.h >new file mode 100644 >index 0000000000000000000000000000000000000000..a4177f8f2ec7c553877d1fb90426d123c16a620f >--- /dev/null >+++ b/Source/WebKit/WebProcess/Payments/WebToPaymentProcessConnection.h >@@ -0,0 +1,70 @@ >+/* >+ * Copyright (C) 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. ``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 >+ * 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. >+ * >+ */ >+ >+#if ENABLE(PAYMENT_PROCESS) >+ >+#pragma once >+ >+#include "Connection.h" >+#include "MessageSender.h" >+#include <WebCore/SWServer.h> >+#include <pal/SessionID.h> >+#include <wtf/RefCounted.h> >+ >+namespace PAL { >+class SessionID; >+} >+ >+namespace WebKit { >+ >+class WebToPaymentProcessConnection : public RefCounted<WebToPaymentProcessConnection>, private IPC::Connection::Client, private IPC::MessageSender { >+public: >+ static Ref<WebToPaymentProcessConnection> create(IPC::Connection::Identifier connectionIdentifier) >+ { >+ return adoptRef(*new WebToPaymentProcessConnection(connectionIdentifier)); >+ } >+ ~WebToPaymentProcessConnection(); >+ >+ IPC::Connection& connection() { return m_connection.get(); } >+ >+private: >+ WebToPaymentProcessConnection(IPC::Connection::Identifier); >+ >+ // IPC::Connection::Client >+ void didReceiveMessage(IPC::Connection&, IPC::Decoder&) override; >+ void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) override; >+ void didClose(IPC::Connection&) override; >+ void didReceiveInvalidMessage(IPC::Connection&, IPC::StringReference messageReceiverName, IPC::StringReference messageName) override; >+ >+ // IPC::MessageSender >+ IPC::Connection* messageSenderConnection() override { return m_connection.ptr(); } >+ uint64_t messageSenderDestinationID() override { return 0; } >+ >+ Ref<IPC::Connection> m_connection; >+}; >+ >+} // namespace WebKit >+#endif // ENABLE(PAYMENT_PROCESS) >diff --git a/Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetController.cpp b/Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetController.cpp >index b0d703c537f00790c4ffca9f3b1d9b41dd08a43e..7b5d00160de35998f5d577a4bf3558b19651c6bc 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetController.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPageInspectorTargetController.cpp >@@ -63,7 +63,7 @@ void WebPageInspectorTargetController::removeTarget(Inspector::InspectorTarget& > > void WebPageInspectorTargetController::connectInspector(const String& targetId, Inspector::FrontendChannel::ConnectionType connectionType) > { >- InspectorTarget* target = m_targets.get(targetId); >+ auto* target = m_targets.get(targetId); > if (!target) > return; > >@@ -78,7 +78,7 @@ void WebPageInspectorTargetController::connectInspector(const String& targetId, > > void WebPageInspectorTargetController::disconnectInspector(const String& targetId) > { >- InspectorTarget* target = m_targets.get(targetId); >+ auto* target = m_targets.get(targetId); > if (!target) > return; > >@@ -91,7 +91,7 @@ void WebPageInspectorTargetController::disconnectInspector(const String& targetI > > void WebPageInspectorTargetController::sendMessageToTargetBackend(const String& targetId, const String& message) > { >- InspectorTarget* target = m_targets.get(targetId); >+ auto* target = m_targets.get(targetId); > if (!target) > return; > >diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp >index 09cea95355311b64c3ae0bc631eda8b10852fffb..3315ac29121db1a9d495dbe27171f4556b8f1617 100644 >--- a/Source/WebKit/WebProcess/WebProcess.cpp >+++ b/Source/WebKit/WebProcess/WebProcess.cpp >@@ -136,6 +136,11 @@ > #include "UserMediaCaptureManager.h" > #endif > >+#if ENABLE(PAYMENT_PROCESS) >+#include "PaymentProcessMessages.h" >+#include "WebToPaymentProcessConnection.h" >+#endif // ENABLE(PAYMENT_PROCESS) >+ > #if ENABLE(SEC_ITEM_SHIM) > #include "SecItemShim.h" > #endif >@@ -1243,6 +1248,31 @@ WebLoaderStrategy& WebProcess::webLoaderStrategy() > { > return m_webLoaderStrategy; > } >+#if ENABLE(PAYMENT_PROCESS) >+void WebProcess::webToPaymentProcessConnectionClosed(WebToPaymentProcessConnection* connection) >+{ >+ ASSERT(m_webToPaymentProcessConnection); >+ ASSERT(m_webToPaymentProcessConnection == connection); >+ >+ m_webToPaymentProcessConnection = nullptr; >+} >+ >+WebToPaymentProcessConnection& WebProcess::ensureWebToPaymentProcessConnection(PAL::SessionID initialSessionID) >+{ >+ if (!m_webToPaymentProcessConnection) { >+ IPC::Attachment encodedConnectionIdentifier; >+ >+ if (!parentProcessConnection()->sendSync(Messages::WebProcessProxy::GetPaymentProcessConnection(initialSessionID), Messages::WebProcessProxy::GetPaymentProcessConnection::Reply(encodedConnectionIdentifier), 0)) { >+ ASSERT_NOT_REACHED(); >+ if (!IPC::Connection::identifierIsValid(connectionIdentifier)) >+ CRASH(); >+ >+ m_webToPaymentProcessConnection = WebToPaymentProcessConnection::create(connectionIdentifier); >+ >+ } >+ return *m_webToPaymentProcessConnection; >+} >+#endif // ENABLE(PAYMENT_PROCESS) > > void WebProcess::setEnhancedAccessibility(bool flag) > { >diff --git a/Source/WebKit/WebProcess/WebProcess.h b/Source/WebKit/WebProcess/WebProcess.h >index 23dec03c9850b2e1a697e3aa6134a8ab416d7b3c..7487ba561f4cf7429bb819be61bc3e6234fc1734 100644 >--- a/Source/WebKit/WebProcess/WebProcess.h >+++ b/Source/WebKit/WebProcess/WebProcess.h >@@ -98,6 +98,9 @@ class WebLoaderStrategy; > class WebPage; > class WebPageGroupProxy; > class WebProcessSupplement; >+#if ENABLE(PAYMENT_PROCESS) >+class WebToPaymentProcessConnection; >+#endif // ENABLE(PAYMENT_PROCESS) > enum class WebsiteDataType; > struct WebPageCreationParameters; > struct WebPageGroupData; >@@ -175,6 +178,11 @@ public: > > LibWebRTCNetwork& libWebRTCNetwork(); > >+#if ENABLE(PAYMENT_PROCESS) >+ void webToPaymentProcessConnectionClosed(WebToPaymentProcessConnection*); >+ WebToPaymentProcessConnection& ensureWebToPaymentProcessConnection(PAL::SessionID initialSessionID); >+#endif // ENABLE(PAYMENT_PROCESS) >+ > void setCacheModel(uint32_t); > > void ensureLegacyPrivateBrowsingSessionInNetworkProcess(); >@@ -444,6 +452,10 @@ private: > > std::unique_ptr<WebAutomationSessionProxy> m_automationSessionProxy; > >+#if ENABLE(PAYMENT_PROCESS) >+ RefPtr<WebToPaymentProcessConnection> m_webToPaymentProcessConnection; >+#endif // ENABLE(PAYMENT_PROCESS) >+ > #if ENABLE(NETSCAPE_PLUGIN_API) > RefPtr<PluginProcessConnectionManager> m_pluginProcessConnectionManager; > #endif >diff --git a/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig b/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig >index 2e9a04d01bdd1421c4b457114bf89c3c784ef9c0..ad6b5f389e374afd7c050841107879efa82a7ae5 100644 >--- a/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig >+++ b/Source/WebKitLegacy/mac/Configurations/FeatureDefines.xcconfig >@@ -292,6 +292,7 @@ ENABLE_NAVIGATOR_STANDALONE_cocoatouch = ENABLE_NAVIGATOR_STANDALONE; > ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(WK_PLATFORM_NAME)); > ENABLE_NOTIFICATIONS_macosx = ENABLE_NOTIFICATIONS; > >+ENABLE_PAYMENT_PROCESS = ENABLE_PAYMENT_PROCESS; > ENABLE_PAYMENT_REQUEST = ENABLE_PAYMENT_REQUEST; > > ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(WK_PLATFORM_NAME)); >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 29fb744c6d9cea64afaac21ff95a910e33bd7f4f..2fefd32b6a61d11140113f85f149786ebc387b62 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,24 @@ >+2018-11-27 Zamiul Haque <zhaque@apple.com> >+ >+ Payment process stub with feature flag >+ https://bugs.webkit.org/show_bug.cgi?id=191298 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: >+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: >+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp: >+ (WTR::TestRunner::terminatePaymentProcess): >+ * WebKitTestRunner/InjectedBundle/TestRunner.h: >+ * WebKitTestRunner/TestController.cpp: >+ (WTR::TestController::generatePageConfiguration): >+ (WTR::TestController::paymentProcessName): >+ (WTR::TestController::paymentProcessDidCrash): >+ (WTR::TestController::terminatePaymentProcess): >+ * WebKitTestRunner/TestController.h: >+ * WebKitTestRunner/TestInvocation.cpp: >+ (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): >+ > 2018-12-19 Megan Gardner <megan_gardner@apple.com> > > Allow clients to set the navigator platform >diff --git a/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig b/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig >index 2e9a04d01bdd1421c4b457114bf89c3c784ef9c0..ad6b5f389e374afd7c050841107879efa82a7ae5 100644 >--- a/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig >+++ b/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig >@@ -292,6 +292,7 @@ ENABLE_NAVIGATOR_STANDALONE_cocoatouch = ENABLE_NAVIGATOR_STANDALONE; > ENABLE_NOTIFICATIONS = $(ENABLE_NOTIFICATIONS_$(WK_PLATFORM_NAME)); > ENABLE_NOTIFICATIONS_macosx = ENABLE_NOTIFICATIONS; > >+ENABLE_PAYMENT_PROCESS = ENABLE_PAYMENT_PROCESS; > ENABLE_PAYMENT_REQUEST = ENABLE_PAYMENT_REQUEST; > > ENABLE_PDFKIT_PLUGIN = $(ENABLE_PDFKIT_PLUGIN_$(WK_PLATFORM_NAME)); >diff --git a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl b/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl >index da022c4f0c7692e7c6df4d62e4596f189eadbc5e..676916f9072326933c467d7435db7edb11f7422a 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl >+++ b/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl >@@ -335,6 +335,7 @@ interface TestRunner { > > void terminateNetworkProcess(); > void terminateServiceWorkerProcess(); >+ void terminatePaymentProcess(); > > readonly attribute boolean didCancelClientRedirect; > >diff --git a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp >index 22579e8918559b8e328f41836f70d15711760892..19e6257151e455005b87c84099c9739a48859873 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp >+++ b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp >@@ -1292,6 +1292,14 @@ void TestRunner::terminateServiceWorkerProcess() > WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), messageName.get(), nullptr, nullptr); > } > >+void TestRunner::terminatePaymentProcess() >+{ >+#if ENABLE(PAYMENT_PROCESS) >+ WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("TerminatePaymentProcess")); >+ WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), messageName.get(), nullptr, nullptr); >+#endif // ENABLE(PAYMENT_PROCESS) >+} >+ > static unsigned nextUIScriptCallbackID() > { > static unsigned callbackID = FirstUIScriptCallbackID; >diff --git a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h >index 120efc8263ec77249b3b0d7da61476a3c8a7af17..4d5f986c301cfa07317336f0fed6f44430b3cda7 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h >+++ b/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h >@@ -448,6 +448,7 @@ public: > > void terminateNetworkProcess(); > void terminateServiceWorkerProcess(); >+ void terminatePaymentProcess(); > > void removeAllSessionCredentials(JSValueRef); > void callDidRemoveAllSessionCredentialsCallback(); >diff --git a/Tools/WebKitTestRunner/TestController.cpp b/Tools/WebKitTestRunner/TestController.cpp >index 2f98ed32396da759f6ffdeddeadc935d11e558d2..5ec3ed71525d465aef7a6b28b02a8912b133dea7 100644 >--- a/Tools/WebKitTestRunner/TestController.cpp >+++ b/Tools/WebKitTestRunner/TestController.cpp >@@ -1075,6 +1075,13 @@ const char* TestController::networkProcessName() > #endif > } > >+#if ENABLE(PAYMENT_PROCESS) >+const char* TestController::paymentProcessName() >+{ >+ return "com.apple.WebKit.Payments"; >+} >+#endif >+ > void TestController::setAllowsAnySSLCertificate(bool allows) > { > WKContextSetAllowsAnySSLCertificateForWebSocketTesting(platformContext(), allows); >@@ -1511,6 +1518,13 @@ void TestController::networkProcessDidCrash(WKContextRef context, const void *cl > static_cast<TestController*>(const_cast<void*>(clientInfo))->networkProcessDidCrash(); > } > >+void TestController::paymentProcessDidCrash(WKContextRef context, const void *clientInfo) >+{ >+#if ENABLE(PAYMENT_PROCESS) >+ static_cast<TestController*>(const_cast<void*>(clientInfo))->paymentProcessDidCrash(); >+#endif >+} >+ > void TestController::didReceiveKeyDownMessageFromInjectedBundle(WKDictionaryRef messageBodyDictionary, bool synchronous) > { > WKRetainPtr<WKStringRef> keyKey = adoptWK(WKStringCreateWithUTF8CString("Key")); >@@ -1844,6 +1858,15 @@ void TestController::networkProcessDidCrash() > exit(1); > } > >+void TestController::paymentProcessDidCrash() >+{ >+#if ENABLE(PAYMENT_PROCESS) >+ pid_t pid = WKContextGetPaymentProcessIdentifier(m_context.get()); >+ fprintf(stderr, "#CRASHED - %s (pid %ld)\n", paymentProcessName(), static_cast<long>(pid)); >+ exit(1); >+#endif >+} >+ > // WKPageNavigationClient > > void TestController::didCommitNavigation(WKPageRef page, WKNavigationRef navigation, WKTypeRef, const void* clientInfo) >@@ -2643,6 +2666,13 @@ void TestController::terminateServiceWorkerProcess() > WKContextTerminateServiceWorkerProcess(platformContext()); > } > >+void TestController::terminatePaymentProcess() >+{ >+#if ENABLE(PAYMENT_PROCESS) >+ WKContextTerminatePaymentProcess(platformContext()); >+#endif >+} >+ > #if !PLATFORM(COCOA) > void TestController::platformWillRunTest(const TestInvocation&) > { >diff --git a/Tools/WebKitTestRunner/TestController.h b/Tools/WebKitTestRunner/TestController.h >index 13a39c6905f0d87ba87b9db57f8dad5c17ac71bc..bf9de537ea8f319398f326de38982c8c5d5fa485 100644 >--- a/Tools/WebKitTestRunner/TestController.h >+++ b/Tools/WebKitTestRunner/TestController.h >@@ -168,7 +168,10 @@ public: > static const char* webProcessName(); > static const char* networkProcessName(); > static const char* databaseProcessName(); >- >+#if ENABLE(PAYMENT_PROCESS) >+ static const char* paymentProcessName(); >+#endif >+ > WorkQueueManager& workQueueManager() { return m_workQueueManager; } > > void setRejectsProtectionSpaceAndContinueForAuthenticationChallenges(bool value) { m_rejectsProtectionSpaceAndContinueForAuthenticationChallenges = value; } >@@ -239,7 +242,8 @@ public: > > void terminateNetworkProcess(); > void terminateServiceWorkerProcess(); >- >+ void terminatePaymentProcess(); >+ > void removeAllSessionCredentials(); > > void clearServiceWorkerRegistrations(); >@@ -348,6 +352,8 @@ private: > // WKContextClient > static void networkProcessDidCrash(WKContextRef, const void*); > void networkProcessDidCrash(); >+ static void paymentProcessDidCrash(WKContextRef, const void*); >+ void paymentProcessDidCrash(); > > // WKPageNavigationClient > static void didCommitNavigation(WKPageRef, WKNavigationRef, WKTypeRef userData, const void*); >diff --git a/Tools/WebKitTestRunner/TestInvocation.cpp b/Tools/WebKitTestRunner/TestInvocation.cpp >index 1a91eb28434d4ed7d1b961220063850540ad782b..72fbb9e8cb3f00dd9a67e5a71a9f92ca7bf986cd 100644 >--- a/Tools/WebKitTestRunner/TestInvocation.cpp >+++ b/Tools/WebKitTestRunner/TestInvocation.cpp >@@ -1453,6 +1453,14 @@ WKRetainPtr<WKTypeRef> TestInvocation::didReceiveSynchronousMessageFromInjectedB > return nullptr; > } > >+#if ENABLE(PAYMENT_PROCESS) >+ if (WKStringIsEqualToUTF8CString(messageName, "TerminatePaymentProcess")) { >+ ASSERT(!messageBody); >+ TestController::singleton().terminatePaymentProcess(); >+ return nullptr; >+ } >+#endif >+ > if (WKStringIsEqualToUTF8CString(messageName, "TerminateNetworkProcess")) { > ASSERT(!messageBody); > TestController::singleton().terminateNetworkProcess();
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
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 191298
:
353947
|
353949
|
354162
|
354191
|
354197
|
354198
|
354226
|
354230
|
354283
|
354407
|
354858
|
354883
|
354885
|
354900
|
354966
|
354983
|
355158
|
355593
|
355595
|
355601
|
355675
|
355679
|
355837
| 357759 |
357829
|
357834
|
357876
|
358014