joyent/node — pull request #8823 by cjihrig (2014-12-04 22:30:30+00:00)
Title: timers: throw on all invalid timer delays

This commit causes all timer functions to throw if the provided delay is anything other than a non-negative, finite number. No type coercion is performed, as it can lead to subtle bugs.

This is a rewrite of #8739 to target the 0.12 branch. The original PR was opened to address #8618. On #8739 and IRC, it was decided that the timer API would be made as strict as possible to avoid subtle bugs. This required updating a number of existing tests that did not pass a second argument to `setTimeout()` and `setInterval()`.

R= @misterdjules or @tjfontaine