Open cpcallen opened 6 years ago
Calling safeEval causes a constructor property to be added to Object in the caller's realm:
safeEval
constructor
Object
console.log(Object.getOwnPropertyDescriptor(Object, 'constructor')); console.log(safeEval('42')); console.log(Object.getOwnPropertyDescriptor(Object, 'constructor'));
Output:
undefined 42 { value: undefined, writable: true, enumerable: true, configurable: true }
Calling
safeEval
causes aconstructor
property to be added toObject
in the caller's realm:Output: