[Harmony Proxies] Proposal: Property fixing
Mark S. Miller
erights at google.com
Thu Jun 16 18:52:51 PDT 2011
On Thu, Jun 16, 2011 at 5:17 PM, Cameron McCormack <cam at mcc.id.au> wrote:
> (BTW, Web IDL is not in Last Call right now, but it is close.)
> One question I forgot to ask, which is just my ignorance about the
> details of the proxy proposal. Say you have a prototype chain like
> [object a] → [object b] → [Object prototype object] → null
> a is a proxy object and b is a normal object. If you define a non-
> configurable property on b, and you look up that property on a, can it
> still be reported as non-configurable?
With the proxy proposal as it stands, no. I agree this is unfortunate. With
proxies as augmented by <
answer is yes, by fixing it on proxy *a*. This is differently unfortunate,
in that it is now an own property on proxy *a*. This is indeed an
interestingly problematic case. In fact, it's probably the most problematic
case identified so far -- congrats.
Practically, do we know of a concrete case where it is a problem if proxy *a
* reports that the property in question is configurable? If not, I suggest
that the lesser evil is to mis-report it as a configurable inherited
property rather than a non-configurable own property. YMMV.
If this is a real problem, then we need to revisit <
http://wiki.ecmascript.org/doku.php?id=strawman:fixed_properties> in that
light. I can imagine introducing the idea of fixing an absence of a shadow,
but I'd rather not.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss