1'use strict'; 2require('../common'); 3const vm = require('vm'); 4 5// Check that we do not accidentally query attributes. 6// Issue: https://github.com/nodejs/node/issues/11902 7const handler = { 8 getOwnPropertyDescriptor: (target, prop) => { 9 throw new Error('whoops'); 10 } 11}; 12const sandbox = new Proxy({ foo: 'bar' }, handler); 13const context = vm.createContext(sandbox); 14 15vm.runInContext('', context); 16