| Index: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
|
| diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
|
| index f44ee457a87e5189ddb438b495d6db1920f95be9..9d1b182dba0decec44806a75e22ec354ea243e6c 100644
|
| --- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
|
| +++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
|
| @@ -282,12 +282,18 @@ TaskQueueManager::ProcessTaskResult TaskQueueManager::ProcessTaskFromWorkQueue(
|
|
|
| internal::TaskQueueImpl::Task pending_task =
|
| work_queue->TakeTaskFromWorkQueue();
|
| +
|
| + // It's possible the task was canceled, if so bail out.
|
| + if (pending_task.task.IsCancelled())
|
| + return ProcessTaskResult::EXECUTED;
|
| +
|
| if (!pending_task.nestable && delegate_->IsNested()) {
|
| // Defer non-nestable work to the main task runner. NOTE these tasks can be
|
| // arbitrarily delayed so the additional delay should not be a problem.
|
| // TODO(skyostil): Figure out a way to not forget which task queue the
|
| // task is associated with. See http://crbug.com/522843.
|
| - delegate_->PostNonNestableTask(pending_task.posted_from, pending_task.task);
|
| + delegate_->PostNonNestableTask(pending_task.posted_from,
|
| + std::move(pending_task.task));
|
| return ProcessTaskResult::DEFERRED;
|
| }
|
|
|
|
|