| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@maclover7 build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/384/pipeline |
Sorry, something went wrong.
There was a problem hiding this comment.
This is still very much used in https://github.com/nodejs/node/blob/master/lib/vm.js. The way the symbol was used in that file made the tests magically pass (as the string key 'undefined' is used in place).
In that particular file the symbol could just be changed to a regular local one declared with Symbol().
Sorry, something went wrong.
|
@TimothyGu But is the property read anywhere? At a glance, it looks like this would be safe to remove from vm.js as well…? |
Sorry, something went wrong.
|
Ah, sorry, missed the lib/vm.js usecase (got when looking over 77b52fd and read that filename as lib/vm.js by accident) I agree with @addaleax though that the use in lib/vm.js could be removed -- doing ggrep -r kParsingContext test/ comes up empty, and whatever ggrep -r "new vm.Script(" test/ and ggrep -r "new Script(" . returns doesn't seem to interact with the symbol at all. |
Sorry, something went wrong.
|
+1 for removal and using a Symbol() declared in vm.js |
Sorry, something went wrong.
|
@TimothyGu I updated to use a symbol declared inside vm.js -- does this seem okay to you? |
Sorry, something went wrong.
|
Looks good, thanks! |
Sorry, something went wrong.
Sorry, something went wrong.
|
Landed in bd2ee60, thank you for the reviews! |
Sorry, something went wrong.
Stopped being used via 77b52fd, was originally added in d932e80. For the one remaining usecase inside of `lib/vm.js`, define a Symbol at the top of the file. PR-URL: #22034 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
@maclover7 @TimothyGu Uh … this seems to have gotten lost in the discussion, but still, does anything speak against removing this key completely? |
Sorry, something went wrong.
|
@addaleax The symbol is used to transmit the parsing context information from vm.runInContext and vm.runInNewContext to the Script constructor, without creating a new public option as the Script constructor is public. I'm fine with exposing it as a public option but it met resistance in #14888 (#14888 (comment)). |
Sorry, something went wrong.
Sorry, something went wrong.
Stopped being used via 77b52fd, was originally added in d932e80. For the one remaining usecase inside of `lib/vm.js`, define a Symbol at the top of the file. PR-URL: #22034 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Stopped being used via 77b52fd, was originally added in d932e80. For the one remaining usecase inside of `lib/vm.js`, define a Symbol at the top of the file. PR-URL: nodejs/node#22034 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
| Back | FazBrowse Home | New Git URL |
Stopped being used via 77b52fd, was
originally added in d932e80.
For the one remaining usecase inside of lib/vm.js, define a Symbol at
the top of the file.
Checklist