Changeset 246345 in webkit
- Timestamp:
- Jun 11, 2019, 8:18:25 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Shared/ApplePay/WebPaymentCoordinatorProxy.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r246344 r246345 1 2019-06-11 Andy Estes <aestes@apple.com> 2 3 [Apple Pay] ASSERTION FAILED: m_state == State::Activating under WebPaymentCoordinatorProxy::showPaymentUI 4 https://bugs.webkit.org/show_bug.cgi?id=198776 5 <rdar://problem/49123795> 6 7 Reviewed by Brian Weinstein. 8 9 It's possible that an active session is aborted before the completion handler passed to 10 platformShowPaymentUI() has executed. When that happens, m_state will be Idle even though we 11 assert that it is Activating. Fix this by returning early in the platformShowPaymentUI() 12 completion handler when m_state is Idle. 13 14 It's not possible to write a layout test for this because MockPaymentCoordinator handles 15 showing payment UI directly in the web process, so this code is not executed in layout 16 tests. The assertion can be reproduced manually by loading 17 https://w3c-test.org/payment-request/payment-is-showing.https.html and clicking the button. 18 19 * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp: 20 (WebKit::WebPaymentCoordinatorProxy::showPaymentUI): 21 1 22 2019-06-11 Patrick Griffis <pgriffis@igalia.com> 2 23 -
trunk/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp
r245796 r246345 105 105 linkIconURLs.append(URL(URL(), linkIconURLString)); 106 106 107 platformShowPaymentUI(originatingURL, linkIconURLs, sessionID, paymentRequest, [ weakThis = makeWeakPtr(*this)](bool result) {107 platformShowPaymentUI(originatingURL, linkIconURLs, sessionID, paymentRequest, [this, weakThis = makeWeakPtr(*this)](bool result) { 108 108 if (!weakThis) 109 109 return; 110 110 111 ASSERT(weakThis->m_state == State::Activating); 112 if (!result) { 113 weakThis->didCancelPaymentSession(); 111 if (m_state == State::Idle) { 112 ASSERT(!activePaymentCoordinatorProxy()); 113 ASSERT(!m_destinationID); 114 ASSERT(m_merchantValidationState == MerchantValidationState::Idle); 114 115 return; 115 116 } 116 117 117 weakThis->m_state = State::Active; 118 ASSERT(m_state == State::Activating); 119 if (!result) { 120 didCancelPaymentSession(); 121 return; 122 } 123 124 m_state = State::Active; 118 125 }); 119 126
Note:
See TracChangeset
for help on using the changeset viewer.