Upcoming change to property descriptors

Allen Wirfs-Brock allen at wirfs-brock.com
Thu Nov 22 14:05:32 PST 2012


You can see the pseudo code very soon...

But, consider that [[GetOwnProperty]] needs to return a descriptor record for internal use, and Object.getOwnPropertyDescriptor needs to use [[GetOwnProperty]] to properly dispatch to different kinds of objects.  Get get an exotic descriptor back from the Proxy [[GetOwnProperty]] implementation there needs to be a way to pass a regular object that might include exotic attributes along so that Object.getOwnPropertyDescriptor can return it.

It doesn't effect anything in any JS level APIs, just makes them work with exotic property descriptors.

Allen



On Nov 22, 2012, at 1:51 PM, David Bruant wrote:

> Hi,
> 
> From the Bugzilla [1], Allen:
> "(...) in rev 12 [property descriptors] have been enhanced to include a reference to the object (if any) they were produced from. This permits an descriptor object to pass through the traps behind Object.getOwnpropertyDesceriptor and Object.defineOwnProperty without loosing any extension attributes"
> I'm not sure I fully understand how this would work.
> Would it affect current calls?
> 
> David
> 
> [1] https://bugs.ecmascript.org/show_bug.cgi?id=863#c1
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
> 



More information about the es-discuss mailing list