mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
doc,vm,test: remove _sandbox_ from vm documentation
The vm documentation uses the word _sandbox_ but has a significant disclaimer about how that should not be interpreted to connote security guarantees. Remove the term "sandbox" from documentation. As a result, some code and tests also need to change. PR-URL: https://github.com/nodejs/node/pull/31057 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
1 parent
e7829758dd
commit
ffe92267fc
3 files changed
+129
-131
No files matched your search
@@ -64,25 +64,25 @@ try {
|
||||
// This is outside of catch block to confirm catch block ran.
|
||||
assert.strictEqual(gh1140Exception.toString(), 'Error');
|
||||
|
||||
const nonContextualSandboxError = {
|
||||
const nonContextualObjectError = {
|
||||
code: 'ERR_INVALID_ARG_TYPE',
|
||||
type: TypeError,
|
||||
message: /must be of type object/
|
||||
};
|
||||
const contextifiedSandboxError = {
|
||||
const contextifiedObjectError = {
|
||||
code: 'ERR_INVALID_ARG_TYPE',
|
||||
type: TypeError,
|
||||
message: /The "contextifiedSandbox" argument must be an vm\.Context/
|
||||
message: /The "contextifiedObject" argument must be an vm\.Context/
|
||||
};
|
||||
|
||||
[
|
||||
[undefined, nonContextualSandboxError],
|
||||
[null, nonContextualSandboxError],
|
||||
[0, nonContextualSandboxError],
|
||||
[0.0, nonContextualSandboxError],
|
||||
['', nonContextualSandboxError],
|
||||
[{}, contextifiedSandboxError],
|
||||
[[], contextifiedSandboxError]
|
||||
[undefined, nonContextualObjectError],
|
||||
[null, nonContextualObjectError],
|
||||
[0, nonContextualObjectError],
|
||||
[0.0, nonContextualObjectError],
|
||||
['', nonContextualObjectError],
|
||||
[{}, contextifiedObjectError],
|
||||
[[], contextifiedObjectError]
|
||||
].forEach((e) => {
|
||||
common.expectsError(() => { script.runInContext(e[0]); }, e[1]);
|
||||
common.expectsError(() => { vm.runInContext('', e[0]); }, e[1]);
|
||||
|
||||
Reference in new issue
Block a user