summaryrefslogtreecommitdiff
path: root/ext/web
diff options
context:
space:
mode:
Diffstat (limited to 'ext/web')
-rw-r--r--ext/web/02_timers.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/web/02_timers.js b/ext/web/02_timers.js
index cfabdeb98..ade1c7123 100644
--- a/ext/web/02_timers.js
+++ b/ext/web/02_timers.js
@@ -243,6 +243,7 @@ function runAfterTimeout(task, millis, timerInfo) {
resolved: false,
prev: scheduledTimers.tail,
next: null,
+ task,
};
// Add timerObject to the end of the list.
@@ -286,7 +287,7 @@ function runAfterTimeout(task, millis, timerInfo) {
while (currentEntry !== null) {
if (currentEntry.millis <= timerObject.millis) {
currentEntry.resolved = true;
- ArrayPrototypePush(timerTasks, task);
+ ArrayPrototypePush(timerTasks, currentEntry.task);
removeFromScheduledTimers(currentEntry);
if (currentEntry === timerObject) {