mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 15:30:56 +01:00
ac153bd2a6
`setTimeout()`, `setInterval()` and `setIntermediate` currently throw errors when receiving non-function objects as their first argument, but only do so when trying to execute the callback, i.e. after the waited time has passed. This may complicate debugging when a lot of calls to `setTimeout()`/etc. are involved, so failing as early as possible seems like a good idea. `setTimeout()` historically ignored an falsy first argument, while the other functions do not and throw instead. This patch changes this behaviour to make all three match and adds remarks in the corresponding documentation. PR-URL: https://github.com/nodejs/node/pull/4362 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> |
||
---|---|---|
.. | ||
api | ||
api_assets | ||
ctc-meetings | ||
tsc-meetings | ||
full-white-stripe.jpg | ||
node.1 | ||
osx_installer_logo.png | ||
releases.md | ||
template.html | ||
thin-white-stripe.jpg |