Must built-in prototypes also be valid instances? (Was: Why DataView.prototype object's [[Class]] is "Object"?)

Erik Arvidsson erik.arvidsson at
Mon Oct 1 08:18:38 PDT 2012

On Sun, Sep 30, 2012 at 1:14 AM, Brendan Eich <brendan at> wrote:
> V8 and SpiderMonkey agree. This avoids making two paths for built-in
> constructor.prototype creation, one that makes a degenerate firstborn of the
> class at hand, the other than makes an Object-instance prototype.

V8 disagrees (like Andreas also pointed out):

'[object Object]'
> Map.prototype.set(1, 2)
TypeError: Method Map.prototype.set called on incompatible receiver #<Map>

I'm with Allen, Andreas and others that the craziness needs to stop.


More information about the es-discuss mailing list