internal/jsre: pass only extra args to setTimeout/setInterval callbacks#32936 (#1782)

This commit is contained in:
wit liu 2025-11-24 13:30:44 +08:00 committed by GitHub
parent b8feb5cffc
commit c53b38e5fe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -189,7 +189,7 @@ loop:
if !isFunc {
panic(re.vm.ToValue("js error: timer/timeout callback is not a function"))
}
call(goja.Null(), timer.call.Arguments...)
call(goja.Null(), timer.call.Arguments[2:]...)
_, inreg := registry[timer] // when clearInterval is called from within the callback don't reset it
if timer.interval && inreg {