Index: components/scheduler/child/task_queue_manager.cc |
diff --git a/components/scheduler/child/task_queue_manager.cc b/components/scheduler/child/task_queue_manager.cc |
index 1e6b25ea4f4d3d59c10eace066c63957cc3411e1..9e3e3d9097cb5f43e2a0760feceba12e956b98dc 100644 |
--- a/components/scheduler/child/task_queue_manager.cc |
+++ b/components/scheduler/child/task_queue_manager.cc |
@@ -283,6 +283,9 @@ bool TaskQueueManager::ProcessTaskFromWorkQueue( |
// arbitrarily delayed so the additional delay should not be a problem. |
main_task_runner_->PostNonNestableTask(pending_task.posted_from, |
pending_task.task); |
+ // Even although we haven't actually run this task yet, we do set it as |
+ // the out_previous_task below because it might be our only chance to |
+ // wake up an after-wakeup queue. |
} else { |
TRACE_TASK_EXECUTION("TaskQueueManager::ProcessTaskFromWorkQueue", |
pending_task); |
@@ -301,10 +304,10 @@ bool TaskQueueManager::ProcessTaskFromWorkQueue( |
FOR_EACH_OBSERVER(base::MessageLoop::TaskObserver, task_observers_, |
DidProcessTask(pending_task)); |
} |
- |
- pending_task.task.Reset(); |
- *out_previous_task = pending_task; |
} |
+ |
+ pending_task.task.Reset(); |
+ *out_previous_task = pending_task; |
return false; |
} |