Skip to content

timers: do not use user object call/apply

Rodrigo Muino Tomonari requested to merge github/fork/Trott/call into master

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

timers

Merge request reports

Loading