-
Notifications
You must be signed in to change notification settings - Fork 30.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
vm: mark global proxy as side-effect-free #27523
Conversation
This comment has been minimized.
This comment has been minimized.
b508b4e
to
178dbb8
Compare
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.
As long as calling to this NamedPropertyHandler is unobservable from JavaScript world - looks good to me!
@ak239 It doesn’t – it might call into JS, however. Your comment gave me the idea to add a test for when that JS code has a side effect – thanks! |
Nice test! As implementer of this side effect free eval in JS - any other calls to JS world should be fine, since they will contain the same side effects check, so getter without side effects should work, even getter that creates temporary objects and modify them will work. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Landed in 815b3aa |
Fixes: #27518 PR-URL: #27523 Reviewed-By: Aleksei Koziatinskii <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Read-only access to `process.env` does not have side effects. Refs: nodejs#27523
Fixes: #27518 PR-URL: #27523 Reviewed-By: Aleksei Koziatinskii <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
Read-only access to `process.env` does not have side effects. Refs: nodejs#27523 PR-URL: nodejs#27684 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Aleksei Koziatinskii <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]>
Read-only access to `process.env` does not have side effects. Refs: #27523 PR-URL: #27684 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Aleksei Koziatinskii <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]>
Fixes: #27518
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes