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

Unified Diff: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc

Issue 2841463003: scheduler: Make virtual time expiration deterministic (Closed)
Patch Set: Review comments Created 3 years, 8 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
Index: third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
index 4ae63b510f0ea3f368b47e6f97ddafc908e63ece..61c0bfdf03629b2e06b5d8c73364f10bd2f41de6 100644
--- a/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
+++ b/third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl.cc
@@ -1858,6 +1858,7 @@ void RendererSchedulerImpl::EnableVirtualTime() {
AutoAdvancingVirtualTimeDomain* time_domain = GetVirtualTimeDomain();
for (const scoped_refptr<TaskQueue>& task_queue : unthrottled_task_runners_)
task_queue->SetTimeDomain(time_domain);
+ control_task_runner_->SetTimeDomain(time_domain);
alex clarke (OOO till 29th) 2017/04/25 11:53:17 I'm a little nervous about that, generally we don'
Sami 2017/04/25 16:58:21 That's a great point, I agree that we should be a
ForceUpdatePolicy();
}
@@ -1869,6 +1870,7 @@ void RendererSchedulerImpl::DisableVirtualTimeForTesting() {
// The |unthrottled_task_runners_| are not actively managed by UpdatePolicy().
for (const scoped_refptr<TaskQueue>& task_queue : unthrottled_task_runners_)
task_queue->SetTimeDomain(time_domain);
+ control_task_runner_->SetTimeDomain(time_domain);
ForceUpdatePolicy();
}

Powered by Google App Engine
This is Rietveld 408576698