Diff
Modified: branches/safari-610.1.13-branch/Source/WebKit/ChangeLog (261648 => 261649)
--- branches/safari-610.1.13-branch/Source/WebKit/ChangeLog 2020-05-13 20:47:22 UTC (rev 261648)
+++ branches/safari-610.1.13-branch/Source/WebKit/ChangeLog 2020-05-13 20:47:25 UTC (rev 261649)
@@ -1,5 +1,62 @@
2020-05-13 Alan Coon <[email protected]>
+ Cherry-pick r261617. rdar://problem/63195712
+
+ REGRESSION (r261254): Broke Apple Pay on macOS
+ https://bugs.webkit.org/show_bug.cgi?id=211826
+ <rdar://problem/63161750>
+
+ Reviewed by Alex Christensen.
+
+ r261254 dropped the code needed to add the WebPaymentCoordinatorProxy as an IPC message receiver.
+ This patch re-introduces the code in order to address the regression.
+
+ No new tests, tested manually on https://applepaydemo.apple.com.
+
+ * NetworkProcess/NetworkConnectionToWebProcess.h:
+ * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm:
+ (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorAddMessageReceiver):
+ (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorRemoveMessageReceiver):
+ * Shared/ApplePay/WebPaymentCoordinatorProxy.h:
+ * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
+ (WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy):
+ (WebKit::WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy):
+ * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+ (WebKit::WebPageProxy::paymentCoordinatorAddMessageReceiver):
+ (WebKit::WebPageProxy::paymentCoordinatorRemoveMessageReceiver):
+ * UIProcess/WebPageProxy.h:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261617 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-05-13 Chris Dumez <[email protected]>
+
+ REGRESSION (r261254): Broke Apple Pay on macOS
+ https://bugs.webkit.org/show_bug.cgi?id=211826
+ <rdar://problem/63161750>
+
+ Reviewed by Alex Christensen.
+
+ r261254 dropped the code needed to add the WebPaymentCoordinatorProxy as an IPC message receiver.
+ This patch re-introduces the code in order to address the regression.
+
+ No new tests, tested manually on https://applepaydemo.apple.com.
+
+ * NetworkProcess/NetworkConnectionToWebProcess.h:
+ * NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm:
+ (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorAddMessageReceiver):
+ (WebKit::NetworkConnectionToWebProcess::paymentCoordinatorRemoveMessageReceiver):
+ * Shared/ApplePay/WebPaymentCoordinatorProxy.h:
+ * Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
+ (WebKit::WebPaymentCoordinatorProxy::WebPaymentCoordinatorProxy):
+ (WebKit::WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy):
+ * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+ (WebKit::WebPageProxy::paymentCoordinatorAddMessageReceiver):
+ (WebKit::WebPageProxy::paymentCoordinatorRemoveMessageReceiver):
+ * UIProcess/WebPageProxy.h:
+
+2020-05-13 Alan Coon <[email protected]>
+
Cherry-pick r261560. rdar://problem/63195727
Unreviewed crash fix.
Modified: branches/safari-610.1.13-branch/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (261648 => 261649)
--- branches/safari-610.1.13-branch/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h 2020-05-13 20:47:22 UTC (rev 261648)
+++ branches/safari-610.1.13-branch/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h 2020-05-13 20:47:25 UTC (rev 261649)
@@ -326,6 +326,8 @@
const String& paymentCoordinatorSourceApplicationBundleIdentifier(const WebPaymentCoordinatorProxy&) final;
const String& paymentCoordinatorSourceApplicationSecondaryIdentifier(const WebPaymentCoordinatorProxy&) final;
std::unique_ptr<PaymentAuthorizationPresenter> paymentCoordinatorAuthorizationPresenter(WebPaymentCoordinatorProxy&, PKPaymentRequest *) final;
+ void paymentCoordinatorAddMessageReceiver(WebPaymentCoordinatorProxy&, IPC::ReceiverName, IPC::MessageReceiver&) final;
+ void paymentCoordinatorRemoveMessageReceiver(WebPaymentCoordinatorProxy&, IPC::ReceiverName) final;
#endif
Ref<IPC::Connection> m_connection;
Modified: branches/safari-610.1.13-branch/Source/WebKit/NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm (261648 => 261649)
--- branches/safari-610.1.13-branch/Source/WebKit/NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm 2020-05-13 20:47:22 UTC (rev 261648)
+++ branches/safari-610.1.13-branch/Source/WebKit/NetworkProcess/ios/NetworkConnectionToWebProcessIOS.mm 2020-05-13 20:47:25 UTC (rev 261649)
@@ -85,6 +85,14 @@
return makeUnique<PaymentAuthorizationController>(coordinator, request);
}
+void NetworkConnectionToWebProcess::paymentCoordinatorAddMessageReceiver(WebPaymentCoordinatorProxy&, IPC::ReceiverName, IPC::MessageReceiver&)
+{
+}
+
+void NetworkConnectionToWebProcess::paymentCoordinatorRemoveMessageReceiver(WebPaymentCoordinatorProxy&, IPC::ReceiverName)
+{
+}
+
#endif // ENABLE(APPLE_PAY_REMOTE_UI)
} // namespace WebKit
Modified: branches/safari-610.1.13-branch/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h (261648 => 261649)
--- branches/safari-610.1.13-branch/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h 2020-05-13 20:47:22 UTC (rev 261648)
+++ branches/safari-610.1.13-branch/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.h 2020-05-13 20:47:25 UTC (rev 261649)
@@ -86,6 +86,8 @@
virtual const String& paymentCoordinatorBoundInterfaceIdentifier(const WebPaymentCoordinatorProxy&) = 0;
virtual const String& paymentCoordinatorSourceApplicationBundleIdentifier(const WebPaymentCoordinatorProxy&) = 0;
virtual const String& paymentCoordinatorSourceApplicationSecondaryIdentifier(const WebPaymentCoordinatorProxy&) = 0;
+ virtual void paymentCoordinatorAddMessageReceiver(WebPaymentCoordinatorProxy&, IPC::ReceiverName, IPC::MessageReceiver&) = 0;
+ virtual void paymentCoordinatorRemoveMessageReceiver(WebPaymentCoordinatorProxy&, IPC::ReceiverName) = 0;
#if PLATFORM(IOS_FAMILY)
virtual UIViewController *paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&) = 0;
virtual const String& paymentCoordinatorCTDataConnectionServiceType(const WebPaymentCoordinatorProxy&) = 0;
Modified: branches/safari-610.1.13-branch/Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm (261648 => 261649)
--- branches/safari-610.1.13-branch/Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm 2020-05-13 20:47:22 UTC (rev 261648)
+++ branches/safari-610.1.13-branch/Source/WebKit/Shared/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm 2020-05-13 20:47:25 UTC (rev 261649)
@@ -79,6 +79,7 @@
: m_client(client)
, m_canMakePaymentsQueue(WorkQueue::create("com.apple.WebKit.CanMakePayments"))
{
+ m_client.paymentCoordinatorAddMessageReceiver(*this, Messages::WebPaymentCoordinatorProxy::messageReceiverName(), *this);
}
WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy()
@@ -85,6 +86,8 @@
{
if (m_state != State::Idle)
hidePaymentUI();
+
+ m_client.paymentCoordinatorRemoveMessageReceiver(*this, Messages::WebPaymentCoordinatorProxy::messageReceiverName());
}
void WebPaymentCoordinatorProxy::platformCanMakePaymentsWithActiveCard(const String& merchantIdentifier, const String& domainName, WTF::Function<void(bool)>&& completionHandler)
Modified: branches/safari-610.1.13-branch/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (261648 => 261649)
--- branches/safari-610.1.13-branch/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2020-05-13 20:47:22 UTC (rev 261648)
+++ branches/safari-610.1.13-branch/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2020-05-13 20:47:25 UTC (rev 261649)
@@ -284,6 +284,16 @@
return websiteDataStore().configuration().sourceApplicationSecondaryIdentifier();
}
+void WebPageProxy::paymentCoordinatorAddMessageReceiver(WebPaymentCoordinatorProxy&, IPC::ReceiverName receiverName, IPC::MessageReceiver& messageReceiver)
+{
+ process().addMessageReceiver(receiverName, m_webPageID, messageReceiver);
+}
+
+void WebPageProxy::paymentCoordinatorRemoveMessageReceiver(WebPaymentCoordinatorProxy&, IPC::ReceiverName receiverName)
+{
+ process().removeMessageReceiver(receiverName, m_webPageID);
+}
+
#endif
#if ENABLE(SPEECH_SYNTHESIS)
Modified: branches/safari-610.1.13-branch/Source/WebKit/UIProcess/WebPageProxy.h (261648 => 261649)
--- branches/safari-610.1.13-branch/Source/WebKit/UIProcess/WebPageProxy.h 2020-05-13 20:47:22 UTC (rev 261648)
+++ branches/safari-610.1.13-branch/Source/WebKit/UIProcess/WebPageProxy.h 2020-05-13 20:47:25 UTC (rev 261649)
@@ -2284,6 +2284,8 @@
const String& paymentCoordinatorBoundInterfaceIdentifier(const WebPaymentCoordinatorProxy&) final;
const String& paymentCoordinatorSourceApplicationBundleIdentifier(const WebPaymentCoordinatorProxy&) final;
const String& paymentCoordinatorSourceApplicationSecondaryIdentifier(const WebPaymentCoordinatorProxy&) final;
+ void paymentCoordinatorAddMessageReceiver(WebPaymentCoordinatorProxy&, IPC::ReceiverName, IPC::MessageReceiver&) final;
+ void paymentCoordinatorRemoveMessageReceiver(WebPaymentCoordinatorProxy&, IPC::ReceiverName) final;
#endif
#if ENABLE(APPLE_PAY) && PLATFORM(IOS_FAMILY)
UIViewController *paymentCoordinatorPresentingViewController(const WebPaymentCoordinatorProxy&) final;