getPrototypeOf invariant

David Bruant bruant.d at gmail.com
Thu Oct 4 04:36:35 PDT 2012


Hi,

Currently, the wiki says:
"Invariant check: check whether the target’s prototype and the trap result
are identical."

If the trap can only report one value, there is almost no point in having a
trap.

A getPrototypeOf trap allows for proxies to potentially simulate __proto__
in a platform where it wouldn't exist natively. It only does if it's
possible to freely report any Object (as per ES5.1 - 8.6) or null.
Or maybe what was meant was only when the target is non-extensible?

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121004/82aefd7f/attachment.html>


More information about the es-discuss mailing list