Re: WindowProxy objects violate ES5 invariants

Le 15/12/2012 17:37, Boris Zbarsky a écrit :
> On 12/15/12 8:36 AM, David Bruant wrote:
>>> Detecting that might be annoying enough to not be worthwhile, though.
>> Annoying for maintainability? for performance?
>
> Mostly for maintainability: you have to whitelist the properties or 
> something.
>
> Though maybe if you never allow defining other non-configurable 
> properties the WindowProxy could just assume that anything 
> non-configurable that _has_ made it through to the Window is legit and 
> just report them all as non-configurable.
Indeed.

>> That point is important. If WindowProxy can reflect [Unforgeable]
>> properties as configurable, then it changes the definition of
>> [Unforgeable].
>
> I don't see how it does.  [Unforgeable] is just defined in terms of 
> what it puts on the Window.
WebIDL says that [Unforgeable] attributes must be reflected as 
non-configurable properties [1]. If WindowProxy allows to reflect 
[Unforgeable] differently, this needs to be documented somehow, but it 
doesn't seem to be the current consensus (which is non-configurable 
accessors).

David

[1] http://dev.w3.org/2006/webapi/WebIDL/#es-attributes

Received on Saturday, 15 December 2012 16:57:14 UTC