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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc

Issue 2708963002: Fix potential DCHECK in TaskQueueThrottler::IncreaseThrottleRefCount (Closed)
Patch Set: Fix bug with re-enabling queue with immediate work Created 3 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 | « no previous file | third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scheduler/renderer/task_queue_throttler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698