On 5 October 2011 18:57, Andreas Rossberg <[email protected]> wrote:
> FIXING PROXIES
>
> A particularly worrisome side effect is fixing a proxy. The proxy
> semantics contains a lot of places saying "If O is a trapping proxy,
> do steps I-J." However, there generally is no guarantee that O remains
> a trapping proxy through all of I-J!
>
> Again, an example:
>
> ----------------
> var handler = {
>  get set() { Object.freeze(p); return undefined },
>  fix: function() { return {} }
> }
> var p = Proxy.create(handler)
> p.x
> ----------------
>
> Firefox 7: TypeError on line 1: getPropertyDescriptor is not a function
> V8: TypeError: Object #<Object> has no method 'getPropertyDescriptor'

Whoops, sorry, I just saw that I screwed up that example. That
behaviour is perfectly fine, of course. Don't have my notes here, I'll
deliver the proper example tomorrow.

/Andreas
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to