report: remove unnecessary return in setters#26614
Closed
Trott wants to merge 1 commit intonodejs:masterfrom
Closed
report: remove unnecessary return in setters#26614Trott wants to merge 1 commit intonodejs:masterfrom
Trott wants to merge 1 commit intonodejs:masterfrom
Conversation
Member
Author
richardlau
approved these changes
Mar 12, 2019
cjihrig
approved these changes
Mar 12, 2019
BethGriggs
approved these changes
Mar 12, 2019
lpinca
approved these changes
Mar 12, 2019
BridgeAR
approved these changes
Mar 12, 2019
Member
|
The value is accessible when using |
Barring shenanigans like Object.getOwnPropertyDescriptor(), return values from a setter function will always be inaccessible. Remove the `return` statements as they can be misleading, suggesting that the return value is accessible and perhaps used somewhere.
Member
Author
Updated the commit message to acknowledge this potential for shenanigans. Rebased so re-running CI out of abundance of caution: https://ci.nodejs.org/job/node-test-pull-request/21479/ |
tniessen
approved these changes
Mar 13, 2019
jasnell
approved these changes
Mar 13, 2019
Member
Author
|
Landed in d78d33d |
Trott
added a commit
to Trott/io.js
that referenced
this pull request
Mar 14, 2019
Barring shenanigans like Object.getOwnPropertyDescriptor(), return values from a setter function will always be inaccessible. Remove the `return` statements as they can be misleading, suggesting that the return value is accessible and perhaps used somewhere. PR-URL: nodejs#26614 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
to targos/node
that referenced
this pull request
Mar 27, 2019
Barring shenanigans like Object.getOwnPropertyDescriptor(), return values from a setter function will always be inaccessible. Remove the `return` statements as they can be misleading, suggesting that the return value is accessible and perhaps used somewhere. PR-URL: nodejs#26614 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Mar 27, 2019
Barring shenanigans like Object.getOwnPropertyDescriptor(), return values from a setter function will always be inaccessible. Remove the `return` statements as they can be misleading, suggesting that the return value is accessible and perhaps used somewhere. PR-URL: #26614 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Barring shenanigans such as using Object.getOwnPropertyDescriptor(), return values from a setter function will always be inaccessible. Remove
the
returnstatements as they can be misleading, suggesting that thereturn value is accessible and perhaps used somewhere.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes