-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
lib: remove unnecessary bind #28131
Closed
Closed
lib: remove unnecessary bind #28131
Conversation
This file contains 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
This comment has been minimized.
This comment has been minimized.
nodejs-github-bot
added
the
lib / src
Issues and PRs related to general changes in the lib or src directory.
label
Jun 8, 2019
This comment has been minimized.
This comment has been minimized.
apapirovski
force-pushed
the
remove-unnecessary-bind
branch
from
June 8, 2019 08:35
9c884b8
to
e51c91c
Compare
lpinca
reviewed
Jun 8, 2019
lpinca
approved these changes
Jun 8, 2019
jasnell
approved these changes
Jun 10, 2019
cjihrig
approved these changes
Jun 10, 2019
Trott
approved these changes
Jun 10, 2019
ping @apapirovski :) |
tniessen
approved these changes
Oct 30, 2019
process.nextTick accepts additional parameters which are passed through to the callback. Use that instead of binding the function to a context.
Pass through parameters using setImmediate rather than using Function.prototype.bind to bind the provided context.
Don't use Function.prototype.bind where it isn't necessary. Rely on event emitter context instead and on arrow function as class property.
apapirovski
force-pushed
the
remove-unnecessary-bind
branch
from
December 13, 2019 20:25
e51c91c
to
c7a87fa
Compare
Well, this is a blast from the past. Thought I merged it... |
apapirovski
force-pushed
the
remove-unnecessary-bind
branch
from
December 13, 2019 20:31
c7a87fa
to
193f0c2
Compare
apapirovski
force-pushed
the
remove-unnecessary-bind
branch
from
December 13, 2019 21:39
193f0c2
to
d077f00
Compare
BridgeAR
approved these changes
Dec 14, 2019
Landed in e17403e...2e738fb |
Trott
pushed a commit
that referenced
this pull request
Dec 14, 2019
process.nextTick accepts additional parameters which are passed through to the callback. Use that instead of binding the function to a context. PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Trott
pushed a commit
that referenced
this pull request
Dec 14, 2019
Pass through parameters using setImmediate rather than using Function.prototype.bind to bind the provided context. PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 17, 2019
Pass through parameters using setImmediate rather than using Function.prototype.bind to bind the provided context. PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 17, 2019
Don't use Function.prototype.bind where it isn't necessary. Rely on event emitter context instead and on arrow function as class property. PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 17, 2019
PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
MylesBorins
pushed a commit
that referenced
this pull request
Dec 17, 2019
PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Merged
targos
pushed a commit
that referenced
this pull request
Jan 14, 2020
process.nextTick accepts additional parameters which are passed through to the callback. Use that instead of binding the function to a context. PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
targos
pushed a commit
that referenced
this pull request
Jan 14, 2020
Pass through parameters using setImmediate rather than using Function.prototype.bind to bind the provided context. PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
targos
pushed a commit
that referenced
this pull request
Jan 14, 2020
Don't use Function.prototype.bind where it isn't necessary. Rely on event emitter context instead and on arrow function as class property. PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
targos
pushed a commit
that referenced
this pull request
Jan 14, 2020
PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
targos
pushed a commit
that referenced
this pull request
Jan 14, 2020
PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
BethGriggs
pushed a commit
that referenced
this pull request
Feb 6, 2020
process.nextTick accepts additional parameters which are passed through to the callback. Use that instead of binding the function to a context. PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
BethGriggs
pushed a commit
that referenced
this pull request
Feb 6, 2020
Pass through parameters using setImmediate rather than using Function.prototype.bind to bind the provided context. PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
BethGriggs
pushed a commit
that referenced
this pull request
Feb 6, 2020
Don't use Function.prototype.bind where it isn't necessary. Rely on event emitter context instead and on arrow function as class property. PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
BethGriggs
pushed a commit
that referenced
this pull request
Feb 6, 2020
PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
BethGriggs
pushed a commit
that referenced
this pull request
Feb 6, 2020
PR-URL: #28131 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Merged
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.
There has been a lot of effort on the V8 side to optimize
bind
performance but nonetheless it's still unnecessary overhead in many cases. Removing it can also make the resulting code more readable as the implied scope isn't immediately apparent when reading certain functions.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes