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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/enqueue_order.cc

Issue 2258713004: Make tasks cancellable inside the blink scheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Various comment nits addressed Created 4 years, 4 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/platform/scheduler/base/enqueue_order.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/base/enqueue_order.cc b/third_party/WebKit/Source/platform/scheduler/base/enqueue_order.cc
index 487f39bb2d706ed833f6477e45270007a4373a8f..f12e42a79e5f9c489a9f4a4d3a95508dae713390 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/enqueue_order.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/enqueue_order.cc
@@ -8,7 +8,9 @@ namespace blink {
namespace scheduler {
namespace internal {
-EnqueueOrderGenerator::EnqueueOrderGenerator() : enqueue_order_(0) {}
+// Note we set the first |enqueue_order_| to 1 so that isValid may distinguish a
+// valid EnqueueOrder from an invalid one.
+EnqueueOrderGenerator::EnqueueOrderGenerator() : enqueue_order_(1) {}
EnqueueOrderGenerator::~EnqueueOrderGenerator() {}

Powered by Google App Engine
This is Rietveld 408576698