Home
last modified time | relevance | path

Searched refs:runInNewContext (Results 1 – 25 of 58) sorted by relevance

123

/third_party/node/test/parallel/
Dtest-vm-new-script-new-context.js31 const result1 = script.runInNewContext();
32 const result2 = script.runInNewContext();
40 script.runInNewContext();
47 script.runInNewContext();
54 script.runInNewContext();
69 const baz = script.runInNewContext(global.obj);
84 script.runInNewContext({ f: changeFoo });
94 script.runInNewContext({ f });
98 script.runInNewContext();
105 script.runInNewContext.call('\'hello\';');
Dtest-vm-run-in-new-context.js33 const result = vm.runInNewContext('\'passed\';');
38 vm.runInNewContext('throw new Error(\'test\');');
42 vm.runInNewContext('hello = 2');
53 const baz = vm.runInNewContext(global.code, global.obj);
61 vm.runInNewContext('f()', { f: changeFoo });
66 vm.runInNewContext('f.a = 2', { f });
70 const fn = vm.runInNewContext('(function() { obj.p = {}; })', { obj: {} });
81 vm.runInNewContext(code, {}, arg);
Dtest-vm-timeout.js46 vm.runInNewContext('while(true) {}', context, { timeout });
49 vm.runInNewContext('runInVM(10)', context, { timeout: 10000 });
62 vm.runInNewContext('while(true) {}', context, { timeout });
65 vm.runInNewContext('runInVM(10000)', context, { timeout: 100 });
77 vm.runInNewContext('throw new Error(\'foobar\')', context, { timeout });
80 vm.runInNewContext('runInVM(10000)', context, { timeout: 100000 });
Dtest-vm-codegen.js6 const { createContext, runInContext, runInNewContext } = require('vm');
16 runInNewContext(test, { WASM_BYTES }, {
48 runInNewContext('eval("x")', {}, {
58 runInNewContext('new WebAssembly.Module(WASM_BYTES)', { WASM_BYTES }, {
78 runInNewContext('eval("x")', {}, {
Dtest-util-types.js81 assert(types.isUint8Array(vm.runInNewContext('new Uint8Array')));
87 vm.runInNewContext('new Uint8ClampedArray')
91 assert(types.isUint16Array(vm.runInNewContext('new Uint16Array')));
94 assert(types.isUint32Array(vm.runInNewContext('new Uint32Array')));
97 assert(types.isInt8Array(vm.runInNewContext('new Int8Array')));
100 assert(types.isInt16Array(vm.runInNewContext('new Int16Array')));
103 assert(types.isInt32Array(vm.runInNewContext('new Int32Array')));
106 assert(types.isFloat32Array(vm.runInNewContext('new Float32Array')));
109 assert(types.isFloat64Array(vm.runInNewContext('new Float64Array')));
112 assert(types.isBigInt64Array(vm.runInNewContext('new BigInt64Array')));
[all …]
Dtest-vm-context.js47 vm.runInNewContext('', null, 'some.js');
94 script.runInNewContext({ require });
122 assert.strictEqual(typeof vm.runInNewContext('String', ctx), 'function');
Dtest-vm-basic.js30 const result = vm.runInNewContext(
69 const result = vm.runInNewContext(
94 assert.throws(() => vm.runInNewContext(script, context, filename), checkErr);
123 vm.runInNewContext('', {}, { [propertyName]: null });
Dtest-vm-proxies.js10 vm.runInNewContext('this.Proxy = Proxy', sandbox);
16 vm.runInNewContext('this.Proxy = Proxy', sandbox);
Dtest-vm-harmony-symbols.js29 vm.runInNewContext('this.Symbol = Symbol', sandbox);
35 vm.runInNewContext('this.Symbol = Symbol', sandbox);
Dtest-buffer-constructor-outside-node-modules.js21 vm.runInNewContext('new Buffer(10)', { Buffer }, {
27 vm.runInNewContext('new Buffer(10)', { Buffer }, {
Dtest-inspector-contexts.js56 vm.runInNewContext('1 + 1');
85 vm.runInNewContext('1 + 1', {}, {
162 vm.runInNewContext('debugger', {});
Dtest-buffer-from.js5 const { runInNewContext } = require('vm');
33 Buffer.from(runInNewContext('new String(checkString)', { checkString })),
Dtest-v8-global-setter.js29 require('vm').runInNewContext('"use strict"; var v = 1; v = 2');
Dtest-intl-v8BreakIterator.js10 assert(!vm.runInNewContext('"v8BreakIterator" in Intl'));
Dtest-vm-low-stack-space.js22 return vm.runInNewContext('() => 42')();
Dtest-vm-set-property-proxy.js15 assert.throws(() => vm.runInNewContext('p = 6', proxy),
/third_party/node/deps/npm/node_modules/process/
Dtest.js130 script.runInNewContext(context);
142 script.runInNewContext(context);
157 script.runInNewContext(context);
170 script.runInNewContext(context);
183 script.runInNewContext(context);
196 script.runInNewContext(context);
/third_party/node/test/addons/make-callback/
Dtest.js40 const foreignObject = vm.runInNewContext('({ fortytwo() { return 42; } })');
44 const target = vm.runInNewContext(`
54 const forward = vm.runInNewContext(`
/third_party/node/test/addons/non-node-context/
Dtest-perf-hooks-timerify.js5 const { runInNewContext } = require(`./build/${common.buildType}/binding`);
11 const check = runInNewContext(`
/third_party/node/test/message/
Dundefined_reference_in_new_context.out9 at Script.runInNewContext (node:vm:*)
10 at Object.runInNewContext (node:vm:*)
Dundefined_reference_in_new_context.js29 vm.runInNewContext('Error.stackTraceLimit = 5; foo.bar = 5;');
/third_party/node/lib/
Dvm.js138 runInNewContext(contextObject, options) { method in Script
286 function runInNewContext(code, contextObject, options) { function
292 return createScript(code, options).runInNewContext(contextObject, options);
335 runInNewContext, property
/third_party/node/test/node-api/test_make_callback/
Dtest.js63 const target = vm.runInNewContext(`
73 const forward = vm.runInNewContext(`
/third_party/parse5/packages/parse5-parser-stream/test/
Dscripting.test.ts4 import { runInNewContext } from 'node:vm';
33 runInNewContext(script, { document: { write: documentWrite } });
/third_party/node/lib/internal/
Dutil.js428 const { runInNewContext } = require('vm');
432 getStructuredStack = runInNewContext(`(function() {
562 const { runInNewContext } = require('vm');
563 internalGlobal = runInNewContext('this', undefined, { contextName: 'internal' });

123