Should __proto__ be an accessor property of Object.prototype?

Erik Arvidsson erik.arvidsson at gmail.com
Sat Jun 22 11:17:29 PDT 2013


On Sat, Jun 22, 2013 at 1:15 PM, Rick Waldron <waldron.rick at gmail.com> wrote:

>>> Pesudocode:
>>>
>>> Object.defineProperty(Object.prototype, '__proto__', {
>>>   get: function(){ return Object.getPrototype(this) },
>>>   set: function(v){ return Object.setProrotype(this, v) },
>>>   enumerable: false,
>>>   configurable: false
>>> }

This is pretty much what was agreed upon. The only difference is that
configurable is true because some security sensitive code needs to be
able to remove the ability to change the [[Prototype]].

--
erik


More information about the es-discuss mailing list