-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timers: length == 0 is untouchable because type checking #8487
Conversation
LGTM if CI is green |
LGTM |
Commit subject line is a bit too long, can I suggest "timers: remove unreachable code"? |
c5ad7fc
to
42fbed1
Compare
Thank you @lpinca changed to your suggestion :) |
LGTM, CI failures look unrelated (one test-crypto-timing-safe-equal failure) |
LGTM |
Actually, isn't |
@Fishrock123 |
Ah yes. Misunderstood. |
Landed at 9b0246b :) |
PR-URL: #8487 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
PR-URL: #8487 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
timers
Description of change
In
setTimetout
,setInterval
andsetImmediate
functions, the case 0 onarguments.length
are untouchable because anTypeError
would be threw and not able to run at that line.