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 <[email protected]>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 returns ({value: 0}). Then > 9.5.5 Proxy.[[GetOwnProperty]] calls 6.2.4.6 > CompletePropertyDescriptor, and all the fields of the Property > Descriptor Record are populated. But the object itself is not > populated. This means Object.getOwnPropertyDescriptor will return an > object that is missing most of the fields the caller wants to know > about. This seems strange. > > 2. The object returned by the handler can have getters. It can answer > ToPropertyDescriptor's queries one way, and then say something else > afterwards, making it look like language invariants have been broken. > > Come to think of it, [[GetOwnProperty]] is a weird API. It computes > two results: a set of Property Descriptor fields, and an [[Origin]] > object. The ES language itself relies exclusively on the former. > Scripts are only allowed to see the latter. That seems really weird to > me. > > What is an example of a concrete use case for this [[Origin]] feature? > Is it to avoid allocating a new object here? > > -j > > [1] https://bugzilla.mozilla.org/show_bug.cgi?id=999156 > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

