Re: WindowProxy objects violate ES5 invariants

On 12/15/12 12:42 PM, David Bruant wrote:
> In that context, I mean "reported by Object.getOwnPropertyDescriptor".
> You say "reported" below. It's the same idea.

Ah, OK.  I thought you were talking about what the property actually 
"is" on the object.  If we're just talking about 
getOwnPropertyDescriptor, which already lies like crazy in browsers, 
then I agree we need to figure out exactly it should lie here.

> The underlying window may change, but the same WindowProxy object must
> show some consistency. It's the same object (identity equality).

Sure.  I think we're in violent agreement here.

>> That would be the practical upshot of them being actually
>> non-configurable on the Window but the WindowProxy lying about it, yes.
> Interesting. That would be an interesting way to think of it from an
> implementation perspective. But as far as authors are concerned, the
> non-[Unforgeable] properties would always be reflected as configurable;
> no way to observe the Window/WindowProxy difference you describe.

Well, there are ways to observe it indirectly.  But yes, no way to 
invoke getOwnPropertyDescriptor on the Window directly.

-Boris

Received on Saturday, 15 December 2012 17:49:07 UTC