-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
doc: improve documentation for the vm module #16867
Conversation
33b1644
to
73470c9
Compare
doc/api/vm.md
Outdated
compiled, saved, and run later. | ||
|
||
A common use case is to run the code in a sandboxed environment. | ||
Then the sandboxed code uses a different |
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.
Maybe:
The sandboxed code uses a different V8 Context, meaning...
doc/api/vm.md
Outdated
sandbox object. | ||
The sandboxed code treats any property on the sandbox like a | ||
global variable. Any changes on global variables caused by the sandboxed | ||
code are recorded on the sandbox object. |
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.
Maybe "recorded on" -> "reflected in"
73470c9
to
3313580
Compare
doc/api/vm.md
Outdated
|
||
A common use case is to run the code in a sandboxed environment. | ||
Then the sandboxed code uses a different V8 Context, meaning that | ||
the it has a different global object than the rest of the code. |
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.
A nit: the it -> it
3313580
to
ed0f7c8
Compare
doc/api/vm.md
Outdated
The sandboxed code uses a different V8 Context, meaning that | ||
it has a different global object than the rest of the code. | ||
|
||
You can provide the context by ["contextifying"][contextified] a sandbox |
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.
Nit: please avoid the use of informal pronouns like you
in the docs :-)
Add an intro section and example for the vm module.
ed0f7c8
to
76276f0
Compare
Thanks for the reviews. Landed in 5e1e460 |
Add an intro section and example for the vm module. PR-URL: #16867 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Add an intro section and example for the vm module. PR-URL: #16867 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Add an intro section and example for the vm module. PR-URL: #16867 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Add an intro section and example for the vm module. PR-URL: #16867 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@fhinkel I've landed this on both v6.x and v8.x please lmk if this isn't appropriate for those release lines |
Add an intro section and example for the vm module. PR-URL: #16867 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Add an intro section and example for the vm module. PR-URL: #16867 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
I think an intro section would help the vm documentation.
Checklist
make lint
(UNIX) passesAffected core subsystem(s)
doc