Home
last modified time | relevance | path

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

/third_party/node/test/parallel/
H A 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
[all...]
H A 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);
H A 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('ne
[all...]
H A Dtest-vm-context.js47 vm.runInNewContext('', null, 'some.js');
94 script.runInNewContext({ require });
122 assert.strictEqual(typeof vm.runInNewContext('String', ctx), 'function');
H A Dtest-vm-basic.js27 // vm.runInNewContext
30 const result = vm.runInNewContext(
67 // vm.runInNewContext
69 const result = vm.runInNewContext(
94 assert.throws(() => vm.runInNewContext(script, context, filename), checkErr);
123 vm.runInNewContext('', {}, { [propertyName]: null });
H A Dtest-inspector-contexts.js56 vm.runInNewContext('1 + 1');
85 vm.runInNewContext('1 + 1', {}, {
162 vm.runInNewContext('debugger', {});
H A Dtest-vm-low-stack-space.js22 return vm.runInNewContext('() => 42')();
H A Dtest-vm-set-property-proxy.js15 assert.throws(() => vm.runInNewContext('p = 6', proxy),
H A Dtest-vm-timeout-escape-promise-2.js4 // set for runInContext, runInNewContext, and runInThisContext.
27 vm.runInNewContext(
H A Dtest-vm-timeout-escape-promise.js5 // set for runInContext, runInNewContext, and runInThisContext.
28 vm.runInNewContext(
H A Dtest-vm-inherited_properties.js34 result = vm.runInNewContext(code, sandbox);
H A Dtest-vm-options-validation.js77 script.runInNewContext({}, options);
H A Dtest-util-promisify.js76 const fn = vm.runInNewContext('(function() {})');
H A Dtest-buffer-alloc.js1151 const arrayBuf = vm.runInNewContext('new ArrayBuffer()');
/third_party/node/test/addons/make-callback/
H A Dtest.js40 const foreignObject = vm.runInNewContext('({ fortytwo() { return 42; } })');
44 const target = vm.runInNewContext(`
54 const forward = vm.runInNewContext(`
/third_party/node/test/node-api/test_make_callback/
H A Dtest.js58 // const foreignObject = vm.runInNewContext('({ fortytwo() { return 42; } })');
63 const target = vm.runInNewContext(`
73 const forward = vm.runInNewContext(`
/third_party/node/lib/
H A Dvm.js136 runInNewContext(contextObject, options) {
284 function runInNewContext(code, contextObject, options) { function
290 return createScript(code, options).runInNewContext(contextObject, options);
380 runInNewContext,
H A Drepl.js206 new SafeSet(vm.runInNewContext('Object.getOwnPropertyNames(globalThis)'));
/third_party/node/test/known_issues/
H A Dtest-vm-ownpropertynames.js24 const nativeNames = vm.runInNewContext('Object.getOwnPropertyNames(this);');
H A Dtest-vm-ownkeys.js24 const nativeKeys = vm.runInNewContext('Reflect.ownKeys(this);');
H A Dtest-vm-timeout-escape-nexttick.js5 // set for runInContext, runInNewContext, and runInThisContext
34 vm.runInNewContext(
H A Dtest-vm-timeout-escape-queuemicrotask.js5 // set for runInContext, runInNewContext, and runInThisContext
31 vm.runInNewContext(
H A Dtest-vm-ownpropertysymbols.js24 const nativeSym = vm.runInNewContext('Object.getOwnPropertySymbols(this);');
/third_party/node/test/pummel/
H A Dtest-vm-memleak.js40 vm.runInNewContext('throw 1;');
/third_party/node/lib/internal/
H A Dutil.js494 const { runInNewContext } = require('vm');
495 // Use `runInNewContext()` to get something tamper-proof and
498 getStructuredStack = runInNewContext(`(function() {
712 const { runInNewContext } = require('vm');
713 internalGlobal = runInNewContext('this', undefined, { contextName: 'internal' });

Completed in 14 milliseconds