Index: third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp |
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp |
index d03e5d7852f6b6d5375882c23d064ce56cb2768d..71410841503daa6480c211178ea4eb5d0a75da9c 100644 |
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp |
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp |
@@ -120,24 +120,29 @@ void PaymentRequestUpdateEvent::updateWith(ScriptState* scriptState, ScriptPromi |
UpdatePaymentDetailsErrorFunction::createFunction(scriptState, m_updater)); |
} |
-void PaymentRequestUpdateEvent::onTimerFired(TimerBase*) |
+DEFINE_TRACE(PaymentRequestUpdateEvent) |
{ |
- if (!m_updater) |
- return; |
+ visitor->trace(m_updater); |
+ Event::trace(visitor); |
+} |
- m_updater->onUpdatePaymentDetailsFailure("Timed out as the page didn't resolve the promise from change event"); |
+void PaymentRequestUpdateEvent::onUpdateEventTimeoutForTesting() |
+{ |
+ onUpdateEventTimeout(0); |
} |
-DEFINE_TRACE(PaymentRequestUpdateEvent) |
+void PaymentRequestUpdateEvent::onUpdateEventTimeout(TimerBase*) |
{ |
- visitor->trace(m_updater); |
- Event::trace(visitor); |
+ if (!m_updater) |
+ return; |
+ |
+ m_updater->onUpdatePaymentDetailsFailure("Timed out as the page didn't resolve the promise from change event"); |
} |
PaymentRequestUpdateEvent::PaymentRequestUpdateEvent(const AtomicString& type, const PaymentRequestUpdateEventInit& init) |
: Event(type, init) |
, m_waitForUpdate(false) |
- , m_abortTimer(this, &PaymentRequestUpdateEvent::onTimerFired) |
+ , m_abortTimer(this, &PaymentRequestUpdateEvent::onUpdateEventTimeout) |
{ |
} |