Title: [249967] trunk/Source/WebCore/Modules/applepay/ApplePayRequestBase.cpp
Revision
249967
Author
[email protected]
Date
2019-09-17 11:11:10 -0700 (Tue, 17 Sep 2019)

Log Message

Rolled out r249964 because it broke the build.

Modified Paths

Diff

Modified: trunk/Source/WebCore/Modules/applepay/ApplePayRequestBase.cpp (249966 => 249967)


--- trunk/Source/WebCore/Modules/applepay/ApplePayRequestBase.cpp	2019-09-17 18:11:02 UTC (rev 249966)
+++ trunk/Source/WebCore/Modules/applepay/ApplePayRequestBase.cpp	2019-09-17 18:11:10 UTC (rev 249967)
@@ -36,7 +36,6 @@
 #else
 namespace WebCore {
 static void finishConverting(ApplePaySessionPaymentRequest&, ApplePayRequestBase&) { }
-static bool requiresSupportedNetworks(unsigned, const ApplePayRequestBase&) { return true; }
 }
 #endif
 
@@ -44,6 +43,9 @@
 
 static ExceptionOr<Vector<String>> convertAndValidate(Document& document, unsigned version, const Vector<String>& supportedNetworks, const PaymentCoordinator& paymentCoordinator)
 {
+    if (supportedNetworks.isEmpty())
+        return Exception { TypeError, "At least one supported network must be provided." };
+
     Vector<String> result;
     result.reserveInitialCapacity(supportedNetworks.size());
     for (auto& supportedNetwork : supportedNetworks) {
@@ -70,9 +72,6 @@
         return merchantCapabilities.releaseException();
     result.setMerchantCapabilities(merchantCapabilities.releaseReturnValue());
 
-    if (requiresSupportedNetworks(version, request) && request.supportedNetworks.isEmpty())
-        return Exception { TypeError, "At least one supported network must be provided." };
-
     auto supportedNetworks = convertAndValidate(document, version, request.supportedNetworks, paymentCoordinator);
     if (supportedNetworks.hasException())
         return supportedNetworks.releaseException();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to