Re: Object.getOwnPropertyDescriptor can return just about anything

2014-05-09 Thread Tom Van Cutsem
Rick, It's true that allowing user-invented custom attributes will not break any important existing invariants (except perhaps that all existing descriptors can be assumed not to have any own properties besides the standard attributes. Existing code may depend on that, although it feels highly

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-05-09 Thread David Bruant
Le 09/05/2014 08:50, Tom Van Cutsem a écrit : Rick, It's true that allowing user-invented custom attributes will not break any important existing invariants (except perhaps that all existing descriptors can be assumed not to have any own properties besides the standard attributes. Existing

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-05-09 Thread Tom Van Cutsem
2014-05-09 9:57 GMT+02:00 David Bruant bruan...@gmail.com: Just to try to assess the unlikelihood and understand the cases where a ES5 code expectations aren't met: The only case where ES6 and ES5 may diverge is for Object.getOwnPropertyDescriptor where a Proxy may return something that

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-05-09 Thread Mark S. Miller
By the same token, it is feasible to postpone these custom attributes till ES7. My concern is that since the [[Origin]]-oriented proxy proposal that has been in the draft spec was a distracting dead end[1], we should be conservative in returning to the design that preserves the crucial invariants.

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-05-08 Thread Tom Van Cutsem
Allen, Mark and I discussed the [[Origin]] issue and came to the following consensus: We remove [[Origin]] and revert to the originally specified behavior ( http://wiki.ecmascript.org/doku.php?id=harmony:proxies_spec) where the descriptor returned by the proxy is coerced into a fresh, normalized,

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-05-08 Thread Rick Waldron
On Thu, May 8, 2014 at 5:23 PM, Tom Van Cutsem tomvc...@gmail.com wrote: Allen, Mark and I discussed the [[Origin]] issue and came to the following consensus: We remove [[Origin]] and revert to the originally specified behavior ( http://wiki.ecmascript.org/doku.php?id=harmony:proxies_spec)

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-30 Thread Tom Van Cutsem
2014-04-30 3:29 GMT+02:00 Allen Wirfs-Brock al...@wirfs-brock.com: Again, there is nothing new here. At the very least you should look at the old discussion about this. Pointers to the old discussions: I first commented on [[Origin]] as part of my review of the first ES6 draft Proxy spec:

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-30 Thread Jason Orendorff
On Tue, Apr 29, 2014 at 7:49 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: The idea is that a Proxy can define its own property descriptor formats that it exposes to and accepts form user code. vis Object.defineProperty/Object.getOwnPropertyDescriptors. This includes the possibility

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-30 Thread Jason Orendorff
On Tue, Apr 29, 2014 at 8:08 PM, Mark S. Miller erig...@google.com wrote: There aren’t any internal invariant sensitivities that I could find. Once such a non-standard descriptor is never directly used by any of the ordinary object MOP operations I'm surprised and alarmed by this, and it

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-30 Thread Mark Miller
This is a stop-the-train scale disaster. ES6 cannot ship in this state. We need to fix this asap. My apologies for not tracking this issue better earlier. I thought we had all agreed on the constraints, so I did not pay sufficient attention to what I thought was merely the ironing out of minor

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-30 Thread Tom Van Cutsem
2014-04-30 18:55 GMT+02:00 Mark Miller erig...@gmail.com: This is a stop-the-train scale disaster. ES6 cannot ship in this state. We need to fix this asap. I agree we need to revisit and iron out the details asap, but keep your calm. I'm sure we'll be able to fix this well in time before the

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-30 Thread Allen Wirfs-Brock
On May 1, 2014, at 2:50 AM, Jason Orendorff jason.orendo...@gmail.com wrote: As specified, proxies can do this: js Object.isFrozen(proxy) true js Object.getOwnPropertyDescriptor(proxy).configurable true No, that is not the intent. However, Object.isFrozen depends upon the

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-30 Thread André Bargull
On May 1, 2014, at 2:50 AM, Jason Orendorff jason.orendorff at gmail.com https://mail.mozilla.org/listinfo/es-discuss wrote: / // As specified, proxies can do this: // // js Object.isFrozen(proxy) // true // js Object.getOwnPropertyDescriptor(proxy).configurable // true / No,

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-30 Thread Jason Orendorff
On Wed, Apr 30, 2014 at 4:06 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On May 1, 2014, at 2:50 AM, Jason Orendorff jason.orendo...@gmail.com wrote: As specified, proxies can do this: js Object.isFrozen(proxy) true js Object.getOwnPropertyDescriptor(proxy).configurable true

Object.getOwnPropertyDescriptor can return just about anything

2014-04-29 Thread Jason Orendorff
The [[Origin]] field of Property Descriptor Records is not yet implemented in Firefox. Eric Faust is looking at implementing it.[1] We noticed two interesting cases: 1. Suppose handler.getOwnPropertyDescriptor returns ({value: 0}). Then 9.5.5 Proxy.[[GetOwnProperty]] calls 6.2.4.6

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-29 Thread Andrea Giammarchi
I think Eric Faust is right over there when he says: It is easily fixed if we do the conversion to PropSpec in the proxy api my 2 cents On Tue, Apr 29, 2014 at 3:43 PM, Jason Orendorff jason.orendo...@gmail.comwrote: The [[Origin]] field of Property Descriptor Records is not yet implemented

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-29 Thread Allen Wirfs-Brock
On Apr 30, 2014, at 8:43 AM, Jason Orendorff jason.orendo...@gmail.com wrote: The [[Origin]] field of Property Descriptor Records is not yet implemented in Firefox. Eric Faust is looking at implementing it.[1] We noticed two interesting cases: 1. Suppose handler.getOwnPropertyDescriptor

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-29 Thread Mark S. Miller
On Tue, Apr 29, 2014 at 5:49 PM, Allen Wirfs-Brock al...@wirfs-brock.comwrote: On Apr 30, 2014, at 8:43 AM, Jason Orendorff jason.orendo...@gmail.com wrote: The [[Origin]] field of Property Descriptor Records is not yet implemented in Firefox. Eric Faust is looking at implementing it.[1]

Re: Object.getOwnPropertyDescriptor can return just about anything

2014-04-29 Thread Allen Wirfs-Brock
On Apr 30, 2014, at 11:08 AM, Mark S. Miller erig...@google.com wrote: I'm surprised and alarmed by this, and it seems wrong. It is also not what I think I remember. What about, for example, the invariant that an object cannot both claim that a property is non-configurable but then later