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

Unified Diff: components/scheduler/base/task_queue_selector.h

Issue 1685093002: Fix bug with TaskQueueSelector and blocked queues (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix UAF Created 4 years, 10 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
« no previous file with comments | « components/scheduler/base/task_queue_manager.cc ('k') | components/scheduler/base/task_queue_selector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/base/task_queue_selector.h
diff --git a/components/scheduler/base/task_queue_selector.h b/components/scheduler/base/task_queue_selector.h
index 80ec7c01b80f2df6a84450374621e3d4a3259a4d..4a82adcfbd38a7c58ae2cbb8d44e143ea4c9da73 100644
--- a/components/scheduler/base/task_queue_selector.h
+++ b/components/scheduler/base/task_queue_selector.h
@@ -85,10 +85,13 @@ class SCHEDULER_EXPORT TaskQueueSelector {
protected:
class SCHEDULER_EXPORT PrioritizingSelector {
public:
- PrioritizingSelector(TaskQueueSelector* task_queue_selector);
+ PrioritizingSelector(TaskQueueSelector* task_queue_selector,
+ const char* name);
- void AssignQueueToSet(internal::TaskQueueImpl* queue,
- TaskQueue::QueuePriority priority);
+ void ChangeSetIndex(internal::TaskQueueImpl* queue,
+ TaskQueue::QueuePriority priority);
+ void AddQueue(internal::TaskQueueImpl* queue,
+ TaskQueue::QueuePriority priority);
void RemoveQueue(internal::TaskQueueImpl* queue);
bool SelectWorkQueueToService(TaskQueue::QueuePriority max_priority,
@@ -113,6 +116,10 @@ class SCHEDULER_EXPORT TaskQueueSelector {
bool* out_chose_delayed_over_immediate,
WorkQueue** out_work_queue) const;
+#if DCHECK_IS_ON() || !defined(NDEBUG)
+ bool CheckContainsQueueForTest(const internal::TaskQueueImpl* queue) const;
+#endif
+
private:
bool ChooseOldestImmediateTaskWithPriority(
TaskQueue::QueuePriority priority,
« no previous file with comments | « components/scheduler/base/task_queue_manager.cc ('k') | components/scheduler/base/task_queue_selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698