Closed
Description
CopyProperties() causes sandboxed Proxy to throw error
despite no code being run. The CopyProperties() function
will be removed shortly with the updates to the V8 API.
Refs: #11671
'use strict';
//Sandbox throws in CopyProperties() despite no code being run
require('../common');
const assert = require('assert');
const vm = require('vm');
const handler = {
getOwnPropertyDescriptor: (target, prop) => {
throw new Error('whoops');
}
};
const sandbox = new Proxy({foo: 'bar'}, handler);
const context = vm.createContext(sandbox);
assert.doesNotThrow(() => vm.runInContext('', context));