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

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

Issue 2170783002: Add a timeout to the update event in case page doesn't resolve promise from updateWith (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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.h
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.h b/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.h
index 510c707dbf2fc8e33df6f30299c5d7c57ed60219..309e8cafea973f7b3234aa2e4d6c4bcdd15e5db3 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.h
@@ -10,6 +10,7 @@
#include "core/events/Event.h"
#include "modules/ModulesExport.h"
#include "modules/payments/PaymentRequestUpdateEventInit.h"
+#include "platform/Timer.h"
#include "platform/heap/Handle.h"
namespace blink {
@@ -33,12 +34,16 @@ public:
DECLARE_VIRTUAL_TRACE();
+ static const int s_abortTimeout = 5;
please use gerrit instead 2016/07/21 16:35:24 s_waitForUpdateSeconds = 60; 60 seconds seems mor
pals 2016/07/22 04:06:19 Done.
+
private:
PaymentRequestUpdateEvent();
PaymentRequestUpdateEvent(const AtomicString& type, const PaymentRequestUpdateEventInit&);
+ void onTimerFired(Timer<PaymentRequestUpdateEvent>*);
please use gerrit instead 2016/07/21 16:35:24 Make this public and call it from your unit test.
pals 2016/07/22 04:06:19 Done.
Member<PaymentUpdater> m_updater;
bool m_waitForUpdate;
+ Timer<PaymentRequestUpdateEvent> m_abortTimer;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698