SpiderMonkey at least goes out of its way to do [[Set]] (let's call it)
not [[DefineOwnProperty]] for 'o = {__proto__: 42}', so why wouldn't
[[Set]] create a fresh property, seeing nothing on Object.prototype
named '__proto__' with a setter to run?

SpiderMonkey/JSC currently just use [[Set]] without any further checks, i.e. when you re-define Object.prototype.__proto__, you're able to interfere object creation which uses __proto__. Is this intentional?

js> Object.defineProperty(Object.prototype, "__proto__", {set: function(){print("setter")}})
({})
js> ({__proto__: null})
setter
({})


- André
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to