primitive boxing in instanceof due to Symbol.hasInstance

Bradley Meck bradley.meck at gmail.com
Mon Jun 15 17:06:25 UTC 2015


Kyle Simpson caused the discovery of this oddity :

https://people.mozilla.org/~jorendorff/es6-draft.html#sec-instanceofoperator
calls GetMethod on C without checking if it is an Object, this means `1
instanceof Foo` could be affected by mutating
`Number.prototype[Symbol.hasInstance]`.

I am assuming this is unintended?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150615/3fa76e3f/attachment.html>


More information about the es-discuss mailing list