Skip to content

Commit ab70430

Browse files
authored
[std/js] Prevent EntryPoint timeout warning on js (#12974)
1 parent 1b346e1 commit ab70430

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

std/haxe/EntryPoint.hx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ class EntryPoint {
1111
#if js
1212
var nextTick = haxe.EventLoop.main.getNextTick();
1313
inline function setTimeoutNextTick() {
14-
(untyped setTimeout)(run, (nextTick < 0 ? 0 : nextTick * 1000));
14+
var time = nextTick < 0 ? 0 : nextTick * 1000;
15+
if( time > 0x7FFFFFFF ) time = 0x7FFFFFFF;
16+
(untyped setTimeout)(run, time);
1517
}
1618
#if nodejs
1719
setTimeoutNextTick();

0 commit comments

Comments
 (0)