Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix timers dropping #1218

Merged
merged 3 commits into from
Jun 17, 2019
Merged

Bugfix timers dropping #1218

merged 3 commits into from
Jun 17, 2019

Conversation

avaer
Copy link
Member

@avaer avaer commented Jun 17, 2019

Exokit optimizes the timers allocation to reuse array slots. Additionally, the timer ids returned to window from setTimeout/setInterval need to be integers starting at 1 -- contrary to node which returns objects.

The bug here was that we were blindly incrementing the returned id in all cases, which allowed it to collide. This meant that clearTimeout could, for example, clear the wrong timeout, leading to really weird bugs.

Partial fix for #1217.

@avaer avaer merged commit 6fc129d into master Jun 17, 2019
@avaer avaer deleted the timer-loss branch June 17, 2019 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant