WebKit Bugzilla
Attachment 371903 Details for
Bug 198776
: [Apple Pay] ASSERTION FAILED: m_state == State::Activating under WebPaymentCoordinatorProxy::showPaymentUI
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198776-20190611183213.patch (text/plain), 2.95 KB, created by
Andy Estes
on 2019-06-11 18:32:14 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Andy Estes
Created:
2019-06-11 18:32:14 PDT
Size:
2.95 KB
patch
obsolete
>Subversion Revision: 246329 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 19102f2976ddb32af3879c9dde6fd40578f289f9..dfb0666f9d60cc665613aee20fb732d3d514ff51 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,24 @@ >+2019-06-11 Andy Estes <aestes@apple.com> >+ >+ [Apple Pay] ASSERTION FAILED: m_state == State::Activating under WebPaymentCoordinatorProxy::showPaymentUI >+ https://bugs.webkit.org/show_bug.cgi?id=198776 >+ <rdar://problem/49123795> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ It's possible that an active session is aborted before the completion handler passed to >+ platformShowPaymentUI() has executed. When that happens, m_state will be Idle even though we >+ assert that it is Activating. Fix this by returning early in the platformShowPaymentUI() >+ completion handler when m_state is Idle. >+ >+ It's not possible to write a layout test for this because MockPaymentCoordinator handles >+ showing payment UI directly in the web process, so this code is not executed in layout >+ tests. The assertion can be reproduced manually by loading >+ https://w3c-test.org/payment-request/payment-is-showing.https.html and clicking the button. >+ >+ * Shared/ApplePay/WebPaymentCoordinatorProxy.cpp: >+ (WebKit::WebPaymentCoordinatorProxy::showPaymentUI): >+ > 2019-06-11 Michael Catanzaro <mcatanzaro@igalia.com> > > Unreviewed build warning fixes >diff --git a/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp b/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp >index d4e1c25008112bbbdf5836f967f0c83c0c6f713d..258c55b03efa5de321955cb7a3b71e7de44b756e 100644 >--- a/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp >+++ b/Source/WebKit/Shared/ApplePay/WebPaymentCoordinatorProxy.cpp >@@ -104,17 +104,24 @@ void WebPaymentCoordinatorProxy::showPaymentUI(WebCore::PageIdentifier destinati > for (const auto& linkIconURLString : linkIconURLStrings) > linkIconURLs.append(URL(URL(), linkIconURLString)); > >- platformShowPaymentUI(originatingURL, linkIconURLs, sessionID, paymentRequest, [weakThis = makeWeakPtr(*this)](bool result) { >+ platformShowPaymentUI(originatingURL, linkIconURLs, sessionID, paymentRequest, [this, weakThis = makeWeakPtr(*this)](bool result) { > if (!weakThis) > return; > >- ASSERT(weakThis->m_state == State::Activating); >+ if (m_state == State::Idle) { >+ ASSERT(!activePaymentCoordinatorProxy()); >+ ASSERT(!m_destinationID); >+ ASSERT(m_merchantValidationState == MerchantValidationState::Idle); >+ return; >+ } >+ >+ ASSERT(m_state == State::Activating); > if (!result) { >- weakThis->didCancelPaymentSession(); >+ didCancelPaymentSession(); > return; > } > >- weakThis->m_state = State::Active; >+ m_state = State::Active; > }); > > completionHandler(true);
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 198776
: 371903