Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vm: properly support symbols on globals
A regression has been introduced in node 18.2.0, it lakes the following snippet fails while it used to work in the past: ``` const assert = require('assert'); const vm = require('vm'); const global = vm.runInContext('this', vm.createContext()); const totoSymbol = Symbol.for('toto'); Object.defineProperty(global, totoSymbol, { enumerable: true, writable: true, value: 4, configurable: true, }); assert(Object.getOwnPropertySymbols(global).includes(totoSymbol)); ``` The PR that introduced the regression is: #42963. So I basically attempted to start understanding what it changed to make it still fix the initial issue while not breaking the symbol related one. Fixes: #45983
- Loading branch information