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

Method runInContext

lib/vm.js:141–151  ·  view source on GitHub ↗
(contextifiedObject, options)

Source from the content-addressed store, hash-verified

139 }
140
141 runInContext(contextifiedObject, options) {
142 validateContext(contextifiedObject);
143 const { breakOnSigint, args } = getRunInContextArgs(
144 contextifiedObject,
145 options,
146 );
147 if (breakOnSigint && process.listenerCount('SIGINT') > 0) {
148 return sigintHandlersWrap(super.runInContext, this, args);
149 }
150 return ReflectApply(super.runInContext, this, args);
151 }
152
153 runInNewContext(contextObject, options) {
154 const context = createContext(contextObject, getContextOptions(options));

Callers 15

runInNewContextMethod · 0.95
mainFunction · 0.95
testFunction · 0.95
testMissingFunction · 0.95
testScriptFunction · 0.95
testScriptImportFailedFunction · 0.95
runInContextFunction · 0.80
controlEvalFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
test-vm-race.jsFile · 0.80

Calls 4

validateContextFunction · 0.85
getRunInContextArgsFunction · 0.85
sigintHandlersWrapFunction · 0.85
listenerCountMethod · 0.80

Tested by 1

testFunction · 0.76