Upcoming change to property descriptors
brandon at brandonbenvie.com
Thu Nov 22 15:41:35 PST 2012
It sounds like this might also be useful to retain the information needed
to rebind super for descriptors that go directly from
Object.getOwnPropertyDescriptor to Object.defineProperty.
On Thu, Nov 22, 2012 at 5:05 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:
> 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.
> On Nov 22, 2012, at 1:51 PM, David Bruant wrote:
> > Hi,
> > From the Bugzilla , 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
> >  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
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss