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

Unified Diff: components/scheduler/base/virtual_time_domain.cc

Issue 2155143002: Fix a bug that could occasionaly cause setInterval to stop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: components/scheduler/base/virtual_time_domain.cc
diff --git a/components/scheduler/base/virtual_time_domain.cc b/components/scheduler/base/virtual_time_domain.cc
index 86108b20368612f1b6fc903fad2fd59f8733ec30..66b7a06649697e9bc1200120d56e66fa609d189a 100644
--- a/components/scheduler/base/virtual_time_domain.cc
+++ b/components/scheduler/base/virtual_time_domain.cc
@@ -33,10 +33,12 @@ base::TimeTicks VirtualTimeDomain::Now() const {
return now_;
}
-base::TimeTicks VirtualTimeDomain::ComputeDelayedRunTime(
- base::TimeTicks time_domain_now,
- base::TimeDelta delay) const {
- return time_domain_now + delay;
+base::TimeTicks VirtualTimeDomain::BlinkNow() const {
+ base::AutoLock lock(lock_);
+ // The VirtualTimeDomain is special. Entering VirtualTimeDomain is intended
+ // to be an one way operation and we really do intend blink to use the virtual
+ // timebase.
+ return now_;
}
void VirtualTimeDomain::RequestWakeup(base::TimeTicks now,

Powered by Google App Engine
This is Rietveld 408576698