W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2009

[whatwg] Storage events

From: João Eiras <joaoe@opera.com>
Date: Thu, 15 Oct 2009 22:32:20 +0200
Message-ID: <op.u1uzb6pi2q99of@coruscant>
On Thu, 15 Oct 2009 20:37:48 +0200, Jeremy Orlow <jorlow at chromium.org>  
wrote:

> I'd like to propose we remove the "source" attribute from storage  
> events.  (
> http://dev.w3.org/html5/webstorage/#the-storage-event)
> In Chrome, we cannot provide access to a window object unless it's in the
> same process.  Since there's no way to guarantee that two windows in the
> same origin are in the same process, Chrome would need to always set it  
> to
> null in order to avoid confusing developers (since what process a page  
> is in
> is really an implementation detail).

The specification tells source is a WindowProxy, so if the underlying  
window is deleted, or inaccessible, accessing any member of source could  
just throw an INVALID_STATE_ERR. The problem is there also if a storage  
event is queued and the originating window is deleted meanwhile, or the  
document with the listener keeps a reference to the originating window for  
a long time, and that window is closed, unless the user agent keeps the  
originating window live while it's WindowPRoxy is not garbage collected,  
which is not desirable.

So, I support Jeremy's suggestion. source should probably be removed from  
the spec. Which are its use cases anyway ?
Received on Thursday, 15 October 2009 13:32:20 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:18 UTC