Chromium Code Reviews| Index: base/threading/worker_pool_posix.cc |
| diff --git a/base/threading/worker_pool_posix.cc b/base/threading/worker_pool_posix.cc |
| index 32a5e92b91c7fa99f241ead417fcc231d70ca539..a10ac8e05139afead4614e26cab29e86ce80e990 100644 |
| --- a/base/threading/worker_pool_posix.cc |
| +++ b/base/threading/worker_pool_posix.cc |
| @@ -140,7 +140,9 @@ void PosixDynamicThreadPool::Terminate() { |
| void PosixDynamicThreadPool::PostTask( |
| const tracked_objects::Location& from_here, |
| const base::Closure& task) { |
| - PendingTask pending_task(from_here, task); |
| + PendingTask pending_task(from_here, |
| + MessageLoop::current()->current_pending_task_, |
|
danakj
2015/04/03 17:18:35
The use of MessageLoop::current()->current_pending
|
| + task); |
| AddTask(&pending_task); |
| } |
| @@ -168,7 +170,7 @@ PendingTask PosixDynamicThreadPool::WaitForTask() { |
| AutoLock locked(lock_); |
| if (terminated_) |
| - return PendingTask(FROM_HERE, base::Closure()); |
| + return PendingTask(FROM_HERE, NULL, base::Closure()); |
| if (pending_tasks_.empty()) { // No work available, wait for work. |
| num_idle_threads_++; |
| @@ -182,7 +184,7 @@ PendingTask PosixDynamicThreadPool::WaitForTask() { |
| if (pending_tasks_.empty()) { |
| // We waited for work, but there's still no work. Return NULL to signal |
| // the thread to terminate. |
| - return PendingTask(FROM_HERE, base::Closure()); |
| + return PendingTask(FROM_HERE, NULL, base::Closure()); |
| } |
| } |