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

Unified Diff: components/scheduler/child/task_queue_sets.h

Issue 1259583006: Reland: Explicitly track the scheduler task enqueueing order in a new field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the DCHECK Created 5 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: components/scheduler/child/task_queue_sets.h
diff --git a/components/scheduler/child/task_queue_sets.h b/components/scheduler/child/task_queue_sets.h
index e5a32752a37a22b7d477b486aeb1df6b72d4326d..fd1869b84eb7dc4a2f20779a0cd90535d7581c2b 100644
--- a/components/scheduler/child/task_queue_sets.h
+++ b/components/scheduler/child/task_queue_sets.h
@@ -39,10 +39,10 @@ class SCHEDULER_EXPORT TaskQueueSets {
internal::TaskQueueImpl** out_queue) const;
private:
- struct AgeComparitor {
- // The age numbers are generated in sequence. These will eventually
- // overflow and roll-over to negative numbers. We must take care to
- // preserve the ordering of the map when this happens.
+ struct EnqueueOrderComparitor {
+ // The enqueueorder numbers are generated in sequence. These will
+ // eventually overflow and roll-over to negative numbers. We must take care
+ // to preserve the ordering of the map when this happens.
// NOTE we assume that tasks don't get starved for extended periods so that
// the task queue ages in a set have at most one roll-over.
// NOTE signed integer overflow behavior is undefined in C++ so we can't
@@ -59,8 +59,9 @@ class SCHEDULER_EXPORT TaskQueueSets {
}
};
- typedef std::map<int, internal::TaskQueueImpl*, AgeComparitor> AgeToQueueMap;
- std::vector<AgeToQueueMap> age_to_queue_maps_;
+ typedef std::map<int, internal::TaskQueueImpl*, EnqueueOrderComparitor>
+ EnqueueOrderToQueueMap;
+ std::vector<EnqueueOrderToQueueMap> enqueue_order_to_queue_maps_;
DISALLOW_COPY_AND_ASSIGN(TaskQueueSets);
};
« no previous file with comments | « components/scheduler/child/task_queue_selector_unittest.cc ('k') | components/scheduler/child/task_queue_sets.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698