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

Re: WindowProxy objects violate ES5 invariants

From: Mark S. Miller <erights@google.com>
Date: Thu, 13 Dec 2012 10:57:45 -0800
Message-ID: <CABHxS9ixR7pz7rmY64TheBY77uXkqSukpRyi2AmehWa+z1qWUA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: David Bruant <bruant.d@gmail.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Thu, Dec 13, 2012 at 10:54 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 12/13/12 1:43 PM, Mark S. Miller wrote:
>>> Note also that there may be some cases in which a WindowProxy will simply
>>> stop pointing to any Window completely.  I don't know whether any of
>>> these
>>> are (yet?) exposed to the web platform...
>> I'm surprised by this and it sounds important. Could you expand?
> One example present in Firefox right now is described at
> <http://blog.kylehuey.com/post/21892343371/fixing-the-memory-leak>.  The
> summary is that all cross-global references in Gecko are handled via
> proxies, and in some instances we will go ahead and change the proxy handler
> on those proxies to one that throws on every single property access (more
> precisely on every single handler hook call) so that we can get rid of the
> object that was being proxied.  Obviously such a proxy would have to always
> claim all its properties are configurable to satisfy the invariants we're
> describing here or something.

No, that change of behavior is fine. The invariants don't say when the
operations must succeed. They only constrain what happens when they
succeed. For example, that's why direct proxies allow revokable
forwarding to frozen objects.

> -Boris

Received on Thursday, 13 December 2012 18:58:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:08 UTC