-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
stream: fix error-path function call #41433
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
The `onFinish()` function takes a single argument. The two extra arguments passed here are already in the function scope, and may result in the error being mishandled.
Review requested:
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a test so that this isn't so easy to break in the future? Looks like the error behavior has been broken for 6 months... Or at least open an issue ticket to add a test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Based on https://coverage.nodejs.org/coverage-f17b73cebd82babe/lib/internal/streams/writable.js.html#L715, it appears that the line of code in question here is not tested at all. 😳 |
Landed in 8c3637c |
The `onFinish()` function takes a single argument. The two extra arguments passed here are already in the function scope, and may result in the error being mishandled. PR-URL: #41433 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Refs: #41433 (comment) PR-URL: #41486 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
The `onFinish()` function takes a single argument. The two extra arguments passed here are already in the function scope, and may result in the error being mishandled. PR-URL: nodejs#41433 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Refs: nodejs#41433 (comment) PR-URL: nodejs#41486 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Refs: #41433 (comment) PR-URL: #41486 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
The `onFinish()` function takes a single argument. The two extra arguments passed here are already in the function scope, and may result in the error being mishandled. PR-URL: nodejs#41433 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Refs: nodejs#41433 (comment) PR-URL: nodejs#41486 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
The `onFinish()` function takes a single argument. The two extra arguments passed here are already in the function scope, and may result in the error being mishandled. PR-URL: #41433 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
The
onFinish()
function takes a single argument. The two extraarguments passed here are already in the function scope, and may result
in the error being mishandled.