Don't use userobject.call/userobject.apply
- Version: v7.9.0
Internally node shouldn't rely on user provided functions/objects having 'normal' values.
e.g.
a = function() { console.log(1,2,3)}; a.call = "some value" setTimeout(a, 100); true
Output:
TypeError: callback.call is not a function
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
For this example, node's timers.js should be using Function.prototype.call or Reflect.apply