Skip to content

setInterval setTimeout break for interval > 2^32-1 #19015

@davidhadas

Description

@davidhadas
  • Version: v6.11.2
  • Platform: tested on linux and mac
  • Subsystem:
 setInterval(()=>{console.log("a");}, Math.pow(2,31));

same for:
setTimeout(()=>{console.log("a");}, Math.pow(2,31));

Timeout is fired as if it is:
setInterval(()=>{console.log("a");}, 0);
or
setTimeout(()=>{console.log("a");}, 0);

The same issue with any timeout or interval > Math.pow(2,31)-1

Should raise an exception instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionIssues that look for answers.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions