Number.prototype not being an instance breaks the web, too

Andreas Rossberg rossberg at google.com
Mon Apr 13 14:47:22 UTC 2015


V8 just rolled a change into Canary yesterday that implements the new ES6
semantics for Number.prototype (and Boolean.prototype) being ordinary
objects. Unfortunately, that seems to break the web. In particular
http://jsfiddle.net/#run fails to load now.

What I see happening on that page is a TypeError "Number.prototype.valueOf
is not generic" being thrown in this function (probably part of moo tools):

Number.prototype.$family = function(){
return isFinite(this) ? 'number' : 'null';
}.hide();

after being invoked on Number.prototype.

AFAICS, that leaves only one option: backing out of this spec change.

(See https://code.google.com/p/chromium/issues/detail?id=476437 for the
bug.)

/Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150413/e7f7fed7/attachment.html>


More information about the es-discuss mailing list