MCPcopy Index your code
hub / github.com/nodejs/node / runScriptInThisContext

Function runScriptInThisContext

lib/internal/vm.js:218–228  ·  view source on GitHub ↗

* Runs a script in the current context. * Internal version of `vm.Script.prototype.runInThisContext()` which skips argument validation. * @param {ReturnType } script - The script to run. * @param {boolean} displayErrors - Whether to display errors. * @param {boolean} breakOn

(script, displayErrors, breakOnFirstLine)

Source from the content-addressed store, hash-verified

216 * @returns {any}
217 */
218function runScriptInThisContext(script, displayErrors, breakOnFirstLine) {
219 return FunctionPrototypeCall(
220 runInContext,
221 script,
222 null, // sandbox - use current context
223 -1, // timeout
224 displayErrors, // displayErrors
225 false, // breakOnSigint
226 breakOnFirstLine, // breakOnFirstLine
227 );
228}
229
230module.exports = {
231 getHostDefinedOptionId,

Callers 2

wrapSafeFunction · 0.85
runScriptInContextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…