Skip to content

fix(runtime): start timer handles at 1#5384

Closed
kushagrabist wants to merge 1 commit into
boa-dev:mainfrom
kushagrabist:fix/timer-handle-positive
Closed

fix(runtime): start timer handles at 1#5384
kushagrabist wants to merge 1 commit into
boa-dev:mainfrom
kushagrabist:fix/timer-handle-positive

Conversation

@kushagrabist
Copy link
Copy Markdown

This Pull Request fixes/closes #5378.

It changes the following:

  • Start timer handles at 1 instead of 0.
  • Reserve 0 for the "no timer scheduled" sentinel value returned by setTimeout() and setInterval().
  • Ensure timer handles are positive integers, matching the HTML Timers specification and avoiding collisions with the sentinel value.

Signed-off-by: kushagra <kushagrabist12@gmail.com>
@kushagrabist kushagrabist requested a review from a team as a code owner May 29, 2026 04:44
@github-actions github-actions Bot added Waiting On Review Waiting on reviews from the maintainers C-Runtime Issues and PRs related to Boa's runtime features and removed Waiting On Review Waiting on reviews from the maintainers labels May 29, 2026
@github-actions github-actions Bot added this to the v1.0.0 milestone May 29, 2026
@jedel1043
Copy link
Copy Markdown
Member

Duplicate of #5379

@jedel1043 jedel1043 marked this as a duplicate of #5379 May 29, 2026
@jedel1043 jedel1043 closed this May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Runtime Issues and PRs related to Boa's runtime features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: setTimeout/setInterval return timer ID 0 for first timer, colliding with no-op sentinel

2 participants