getPrototypeOf invariant

2012-10-04 Thread David Bruant
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

Re: getPrototypeOf invariant

2012-10-04 Thread Mark S. Miller
On Thu, Oct 4, 2012 at 4:36 AM, David Bruant bruan...@gmail.com wrote: 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. General

Re: getPrototypeOf invariant

2012-10-04 Thread David Bruant
2012/10/4 Mark S. Miller erig...@google.com On Thu, Oct 4, 2012 at 4:36 AM, David Bruant bruan...@gmail.com wrote: 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

Re: getPrototypeOf invariant

2012-10-04 Thread David Bruant
Le 04/10/2012 20:35, Mark S. Miller a écrit : On Thu, Oct 4, 2012 at 8:40 AM, David Bruant bruan...@gmail.com mailto:bruan...@gmail.com wrote: * It allows the target to be modified first, in anticipation of the target being queried at the end of the trap. Do we really

Re: getPrototypeOf invariant

2012-10-04 Thread Mark S. Miller
If the extensible proxy has no access to the original Object.prototype.__proto__, then it cannot modify the [[Prototype]] of its target, and so should not be able to seem to have its own mutable [[Prototype]] On Thu, Oct 4, 2012 at 12:55 PM, David Bruant bruan...@gmail.com wrote: Le 04/10/2012

Re: getPrototypeOf invariant

2012-10-04 Thread David Bruant
Le 04/10/2012 22:01, Mark S. Miller a écrit : If the extensible proxy has no access to the original Object.prototype.__proto__, then it cannot modify the [[Prototype]] of its target, and so should not be able to seem to have its own mutable [[Prototype]] Ok, so the rationale behind the

Re: getPrototypeOf invariant

2012-10-04 Thread Brendan Eich
David Bruant wrote: Le 04/10/2012 22:01, Mark S. Miller a écrit : If the extensible proxy has no access to the original Object.prototype.__proto__, then it cannot modify the [[Prototype]] of its target, and so should not be able to seem to have its own mutable [[Prototype]] Ok, so the