-
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
vm: name anonymous functions #9388
Conversation
@@ -18,19 +18,21 @@ const realRunInContext = Script.prototype.runInContext; | |||
|
|||
Script.prototype.runInThisContext = function(options) { | |||
if (options && options.breakOnSigint) { | |||
return sigintHandlersWrap(() => { | |||
const sigintHandler = () => { |
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.
If line length is below 80 chars I think it is ok to put the whole function expression on one line.
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.
I am a bit 😕 about the name here… this function does not handle any kind of signal; it’s the exact opposite, the function is run undisturbed by SIGINTs. (The comment/code for sigintHandlersWrap
has a bit more information.) So maybe you could call it realRunInThisContext
or runScriptUninterruped
or something like that?
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.
where is the doc you are referring to , i want to understand this a little better
CI: https://ci.nodejs.org/job/node-test-commit/5938/console Going to land if no one objects. |
Name anonymous arrow function in vm module to improve readability PR-URL: #9388 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Ref: #8913
Landed in 5079763 Thanks! |
Name anonymous arrow function in vm module to improve readability PR-URL: #9388 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Ref: #8913
#10816 should land at the same time as this. |
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
vm
Description of change
named arrow function handlers :)
Ref: #8913