timers: do not use user object call/apply
setTimeout()
and setInterval()
should work even if the user has
monkey-patched .call()
and .apply()
to undesirable values. (This is
true for setImmediate()
as well, but setImmediate()
works just fine
in the current implementation. The test added here nonetheless adds a
test for setImmediate()
as well as setTimeout()
and setInterval()
.
Refs: https://github.com/nodejs/node/issues/12956
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
commit message follows commit guidelines
Affected core subsystem(s)
timers