Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp

Issue 2640293002: PaymentRequest: Move m_abortTimer to frame-specific TaskRunnerTimer. (Closed)
Patch Set: MiscPlatformAPI Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 1b63d6e878198d176196a857ffddde902229d21e..f34a4bc3ca49553138c9207575046f0e2bc2246e 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp
@@ -8,6 +8,8 @@
#include "bindings/core/v8/ScriptFunction.h"
#include "core/dom/DOMException.h"
#include "core/dom/ExceptionCode.h"
+#include "core/dom/ExecutionContext.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "modules/payments/PaymentUpdater.h"
#include "public/platform/WebTraceLocation.h"
#include "wtf/text/WTFString.h"
@@ -85,9 +87,10 @@ class UpdatePaymentDetailsErrorFunction : public ScriptFunction {
PaymentRequestUpdateEvent::~PaymentRequestUpdateEvent() {}
PaymentRequestUpdateEvent* PaymentRequestUpdateEvent::create(
+ ExecutionContext* executionContext,
const AtomicString& type,
const PaymentRequestUpdateEventInit& init) {
- return new PaymentRequestUpdateEvent(type, init);
+ return new PaymentRequestUpdateEvent(executionContext, type, init);
}
void PaymentRequestUpdateEvent::setPaymentDetailsUpdater(
@@ -145,10 +148,14 @@ void PaymentRequestUpdateEvent::onUpdateEventTimeout(TimerBase*) {
}
PaymentRequestUpdateEvent::PaymentRequestUpdateEvent(
+ ExecutionContext* executionContext,
const AtomicString& type,
const PaymentRequestUpdateEventInit& init)
: Event(type, init),
m_waitForUpdate(false),
- m_abortTimer(this, &PaymentRequestUpdateEvent::onUpdateEventTimeout) {}
+ m_abortTimer(
+ TaskRunnerHelper::get(TaskType::MiscPlatformAPI, executionContext),
+ this,
+ &PaymentRequestUpdateEvent::onUpdateEventTimeout) {}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698