Skip to content

Commit fb8d1e2

Browse files
author
Jake Champion
committed
add comment above repeat_first to explain the caller must check timers is not empty before calling repeat_first
1 parent 128bca9 commit fb8d1e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

c-dependencies/js-compute-runtime/js-compute-builtins.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4014,6 +4014,8 @@ class ScheduledTimers {
40144014
timers.insert(iter, timer);
40154015
}
40164016

4017+
// `repeat_first` must only be called if the `timers` list is not empty
4018+
// The caller of repeat_first needs to check the `timers` list is not empty
40174019
void repeat_first() {
40184020
Timer *timer = first();
40194021
MOZ_ASSERT(timer);

0 commit comments

Comments
 (0)