[Harmony proxies] Non-configurable properties: fixed properties VS trap all with invariants enforcement

David Bruant david.bruant at labri.fr
Sun Jul 3 12:44:33 PDT 2011

Le 03/07/2011 21:32, Mark S. Miller a écrit :
> On Sun, Jul 3, 2011 at 11:07 AM, David Bruant <david.bruant at labri.fr
> <mailto:david.bruant at labri.fr>> wrote:
>     Le 03/07/2011 14:59, Tom Van Cutsem a écrit :
>     > As a follow-up to the fixed properties proposal:
>     >
>     > I created a prototype implementation of fixed properties on top
>     of the
>     > existing Proxy API. The idea is to wrap an existing proxy
>     handler in a
>     > FixedHandler. This FixedHandler does the bookkeeping and checking to
>     > ensure that the wrapped handler doesn't misreport non-configurable
>     > properties.
>     >
>     > Full source code available here:
>     >
>     <http://code.google.com/p/es-lab/source/browse/trunk/src/proxies/FixedHandler.js>
>     Just to make sure I do not misunderstand your work:
>     - Your code relies on current Proxy implementation behavior (FF4&5)
>     which doesn't do any check on the "configurable" attribute for
>     defineProperty and get{Own}PropertyDecsriptor traps
> I didn't know that. Is there a bug filed on this yet or a test case
> that demonstrates this bug?
var h = {getOwnPropertyDescriptor:function(name){return {value:1,
var p = Proxy.create(h);

console.log( Object.getOwnPropertyDescriptor(p, 'a') );
I just tried on Firebug (FF5) and it returned
Should have returned configurable:true according to current proposal.
There is no bug filed I would be aware of. But I think there is no rush
and it can wait until decisions are made at the July TC39 meeting, no?
If the some form of the fixed property proposal is accepted, it would
replace any bug filed asking to always return true for configurability.
Proxies bugs haven't received much attention lately anyway as far as I know.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110703/31126304/attachment.html>

More information about the es-discuss mailing list