Chromium Code Reviews| Index: third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc |
| diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc |
| index fee7f311ab1eb2885fe4cf5c7f51be0844a82e76..f2c0312d9ca5d383403ffd5c34e20b2e8bb61b5c 100644 |
| --- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc |
| +++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc |
| @@ -803,6 +803,13 @@ void TaskQueueImpl::EnableOrDisableWithSelector(bool enable) { |
| return; |
| if (enable) { |
| + if (!main_thread_only().immediate_work_queue->Empty()) { |
| + main_thread_only().time_domain->OnQueueHasImmediateWork(this); |
| + } else { |
| + base::AutoLock lock(any_thread_lock_); |
| + if (!any_thread().immediate_incoming_queue.empty()) |
| + main_thread_only().time_domain->OnQueueHasImmediateWork(this); |
|
Sami
2017/02/21 18:21:02
Should we call this outside the lock? Thinking abo
alex clarke (OOO till 29th)
2017/02/21 20:52:30
Done.
|
| + } |
| if (!main_thread_only().delayed_incoming_queue.empty()) { |
| main_thread_only().time_domain->ScheduleDelayedWork( |
| this, |