Number.prototype not being an instance breaks the web, too
Mark S. Miller
erights at google.com
Mon Apr 13 20:21:20 UTC 2015
On Mon, Apr 13, 2015 at 12:53 PM, Jordan Harband <ljharb at gmail.com> wrote:
> Please note that the `@@toStringTag` changes mean that we do need to
> always have a Number.prototype method that throws when the value does not
> have a [[NumberData]] internal slot - I'm using `Number#toString` for that
> right now, but others may now be relying on the throw behavior of
> `Number#valueOf.
>
Wow, awesome catch!
Even though I recently implemented https://codereview.appspot.com/198470043
, I completely missed that.
To see Caja's current set of dependencies:
https://code.google.com/p/google-caja/source/browse/trunk/src/com/google/caja/ses/repairES5.js#579
They are:
Date.prototype.getDay
(Number,Boolean,String).prototype.toString
RegExpr.prototype.exec
WeakMap.prototype.get
If any of these stop throwing, for Caja and SES, that would be a breaking
change.
Thanks for noticing this!
--
Cheers,
--MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150413/fb026078/attachment.html>
More information about the es-discuss
mailing list