W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

Re: WindowProxy objects violate ES5 invariants

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sat, 15 Dec 2012 12:22:07 -0500
Message-ID: <50CCB1BF.6070508@mit.edu>
To: David Bruant <bruant.d@gmail.com>
CC: public-script-coord@w3.org
On 12/15/12 12:05 PM, David Bruant wrote:
> I guess that reveals a different invariant violation :-)

Why?

> I guess you meant "non-configurable" here.

Yes.

> But it creates a violation of ES5, because it means that
> var/let/const/function global declaration aren't reflected as
> non-configurable

"reflected"?  The section of ES5 in question describes how the 
properties are created.  That's how they would be created on the Window 
object: as non-configurable.

If you then ask some _other_ object about those property names, they 
might get reported as configurable, but I don't see the invariant 
violation there.

> I think the solution may just be to reflect as configurable, but act as if
> it was non-configurable (and I guess non-writable for "const" declarations)

That would be the practical upshot of them being actually 
non-configurable on the Window but the WindowProxy lying about it, yes.

-Boris
Received on Saturday, 15 December 2012 17:22:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:08 UTC