You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Object.defineProperty on the global object does not handle 'writable' properly in vm context #10223
{ value: 'zxcv',
writable: true,
enumerable: true,
configurable: true }
TypeError: Cannot assign to read only property 'dummy' of object '#<Object>'
at evalmachine.<anonymous>:7:11
at ContextifyScript.Script.runInContext (vm.js:35:29)
at Object.exports.runInContext (vm.js:67:17)
at Object.<anonymous> (/home/i8-pi/src/zxcv.js:5:4)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
osef
Expected behaviour is that the property descriptor for dummy to have writable, enumerable and configurable == false. Omitting writable from the defineProperty call behaves in the same way as specifying it to be false. Also, assigning to dummy then actually changes the property value, even though the assignment throws an exception
Activity