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

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

Issue 2533603002: [scheduler] Add options to TaskQueue::InsertFence (Closed)
Patch Set: More nits Created 4 years, 1 month 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 f12e42a79e5f9c489a9f4a4d3a95508dae713390..fcfd3ffdd817f4160af9c23e4f65752af447d972 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/enqueue_order.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/enqueue_order.cc
@@ -8,9 +8,10 @@ namespace blink {
namespace scheduler {
namespace internal {
-// 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) {}
+// Note we set the first |enqueue_order_| to a specific non-zero value, because
+// first N values of EnqueueOrder have special meaning (see EnqueueOrderValues).
+EnqueueOrderGenerator::EnqueueOrderGenerator()
+ : enqueue_order_(static_cast<EnqueueOrder>(EnqueueOrderValues::FIRST)) {}
EnqueueOrderGenerator::~EnqueueOrderGenerator() {}

Powered by Google App Engine
This is Rietveld 408576698