-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
stream: fix error-path function call #41433
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 <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Refs: #41433 (comment) PR-URL: #41486 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
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 <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Refs: nodejs#41433 (comment) PR-URL: nodejs#41486 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Refs: #41433 (comment) PR-URL: #41486 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
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 <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Refs: nodejs#41433 (comment) PR-URL: nodejs#41486 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
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 <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
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.