Title: [203746] trunk/Source/WebCore
Revision
203746
Author
ander...@apple.com
Date
2016-07-26 15:56:54 -0700 (Tue, 26 Jul 2016)

Log Message

onpaymentauthorized callback not received when authorizing for a second time
https://bugs.webkit.org/show_bug.cgi?id=160218
rdar://problem/27527151

Reviewed by Tim Horton.

Only null out the active session if the status is a final state status.

* Modules/applepay/PaymentCoordinator.cpp:
(WebCore::PaymentCoordinator::completePaymentSession):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (203745 => 203746)


--- trunk/Source/WebCore/ChangeLog	2016-07-26 22:42:50 UTC (rev 203745)
+++ trunk/Source/WebCore/ChangeLog	2016-07-26 22:56:54 UTC (rev 203746)
@@ -1,3 +1,16 @@
+2016-07-26  Anders Carlsson  <ander...@apple.com>
+
+        onpaymentauthorized callback not received when authorizing for a second time
+        https://bugs.webkit.org/show_bug.cgi?id=160218
+        rdar://problem/27527151
+
+        Reviewed by Tim Horton.
+
+        Only null out the active session if the status is a final state status.
+
+        * Modules/applepay/PaymentCoordinator.cpp:
+        (WebCore::PaymentCoordinator::completePaymentSession):
+
 2016-07-26  Chris Dumez  <cdu...@apple.com>
 
         Range.prototype.compareBoundaryPoints.length should be 2

Modified: trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp (203745 => 203746)


--- trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp	2016-07-26 22:42:50 UTC (rev 203745)
+++ trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp	2016-07-26 22:56:54 UTC (rev 203746)
@@ -29,6 +29,7 @@
 #if ENABLE(APPLE_PAY)
 
 #include "ApplePaySession.h"
+#include "PaymentAuthorizationStatus.h"
 #include "PaymentCoordinatorClient.h"
 #include "URL.h"
 
@@ -103,6 +104,10 @@
     ASSERT(m_activeSession);
 
     m_client.completePaymentSession(status);
+
+    if (!isFinalStateStatus(status))
+        return;
+
     m_activeSession = nullptr;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to