W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

Re: [FileAPI] createObjectURL isReusable proposal

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 30 Jan 2012 11:51:39 -0500
Message-ID: <4F26CA9B.400@mit.edu>
To: public-webapps@w3.org
On 1/30/12 11:44 AM, Bronislav Klučka wrote:
> Both could be solved by Blob.URL, there is no strange string somehow
> connected to blob. Blob belongs to URL and URL belongs to blob... who
> cares how exactly is the string created (split -> join), it is string
> identification, not pointer reference...

That would mean that as soon as you access Blob.URL on a given Blob that 
Blob is then leaked for the lifetime of all documents which can touch 
that Blob object, right?

Why is that desirable?

>> The same blob should have different URLs in different documents, no?
> All documents originated from the same application/session/same-origin?

No.  That's the point.  Unless you want the lifetime of the Blob to 
immediately become "while you have any documents from this origin open".

Or in more concrete terms, while you Google Reader is open, no Blobs on 
any google.com page that have had urls created for them would ever be 
collected.  That seems very bad.

> I'd prefer the same URL ( e.g. just passing string using
> window.postMessage) . What if I move image element from one document to
> another (from top window to iframe) should it have no identifiable
> underlying data? I don't like that

It's not great; the alternatives just seem worse.

-Boris
Received on Monday, 30 January 2012 16:52:07 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:50 GMT