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

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

Issue 2915993003: Revert of [scheduler] Change TaskQueue observer call mechanism. (Closed)
Patch Set: Created 3 years, 7 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/base/time_domain.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/base/time_domain.cc b/third_party/WebKit/Source/platform/scheduler/base/time_domain.cc
index 66b7bae655c7a1f31e62a7a199469a58f5a001e8..bdf885b5da186342be32f72947d9259b9edfdcdf 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/time_domain.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/time_domain.cc
@@ -41,7 +41,7 @@
// We only want to store a single wake-up per queue, so we need to remove any
// previously registered wake up for |queue|.
if (queue->heap_handle().IsValid()) {
- DCHECK(queue->scheduled_time_domain_wake_up());
+ DCHECK_NE(queue->scheduled_time_domain_wake_up(), base::TimeTicks());
// O(log n)
delayed_wake_up_queue_.ChangeKey(queue->heap_handle(), {wake_up, queue});
@@ -50,7 +50,7 @@
delayed_wake_up_queue_.insert({wake_up, queue});
}
- queue->SetScheduledTimeDomainWakeUp(wake_up.time);
+ queue->set_scheduled_time_domain_wake_up(wake_up.time);
// If |queue| is the first wake-up then request the wake-up.
if (delayed_wake_up_queue_.Min().queue == queue)
@@ -65,7 +65,7 @@
if (!queue->heap_handle().IsValid())
return;
- DCHECK(queue->scheduled_time_domain_wake_up());
+ DCHECK_NE(queue->scheduled_time_domain_wake_up(), base::TimeTicks());
DCHECK(!delayed_wake_up_queue_.empty());
base::TimeTicks prev_first_wake_up =
delayed_wake_up_queue_.Min().wake_up.time;
@@ -95,11 +95,11 @@
if (next_wake_up) {
// O(log n)
delayed_wake_up_queue_.ReplaceMin({*next_wake_up, queue});
- queue->SetScheduledTimeDomainWakeUp(next_wake_up->time);
+ queue->set_scheduled_time_domain_wake_up(next_wake_up->time);
} else {
// O(log n)
delayed_wake_up_queue_.Pop();
- DCHECK(!queue->scheduled_time_domain_wake_up());
+ DCHECK_EQ(queue->scheduled_time_domain_wake_up(), base::TimeTicks());
}
}
}

Powered by Google App Engine
This is Rietveld 408576698