fix: crash in utilityProcess when generating code from strings (#38014)
This commit is contained in:
parent
f12e12b341
commit
0240f6664e
14 changed files with 72 additions and 48 deletions
6
spec/fixtures/api/utility-process/eval.js
vendored
Normal file
6
spec/fixtures/api/utility-process/eval.js
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
const vm = require('node:vm');
|
||||
|
||||
const contextObject = { result: 0 };
|
||||
vm.createContext(contextObject);
|
||||
vm.runInContext('eval(\'result = 42\')', contextObject);
|
||||
process.parentPort.postMessage(contextObject.result);
|
Loading…
Add table
Add a link
Reference in a new issue