Array.isArray(new Proxy([], {})) should be false (Bug 1096753)

David Bruant bruant.d at
Sat Nov 15 01:24:10 PST 2014

Le 13/11/2014 17:29, Boris Zbarsky a écrit :
> On 11/13/14, 6:44 AM, Andreas Rossberg wrote:
>> Well, the actual diabolic beast and universal foot gun in this example
>> is setPrototypeOf. ;)
> Note that there is at least some discussion within Mozilla about 
> trying to make the prototype of Object.prototype immutable (such that 
> Object.getPrototypeOf(Object.prototype) is guaranteed to always return 
> the same thing, modulo someone overriding Object.getPrototypeOf), 
> along with a few other things along those lines.  See 
> <>.
This would result in objects which [[Prototype]] cannot be changed but 
which properties can be changed.
This is not possible per ES6 semantics I believe unless the object is a 
proxy (which setPrototypeOf trap throws unconditionally and forwards the 
rest to the target). Is it a satisfactory explanation? Should new 
primitives be added?

> Whether this is web-compatible, we'll see.
I guess my above questions can wait the answer to this part.


More information about the es-discuss mailing list