W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

RE: Lifetime of Blob URL

From: Adrian Bateman <adrianba@microsoft.com>
Date: Tue, 13 Jul 2010 13:50:28 +0000
To: Darin Fisher <darin@chromium.org>, David Levin <levin@google.com>, "Jonas Sicking (jonas@sicking.cc)" <jonas@sicking.cc>
CC: "arun@mozilla.com" <arun@mozilla.com>, Web Applications Working Group WG <public-webapps@w3.org>
Message-ID: <104E6B5B6535E849970CDFBB1C5216EB2F2EB115@TK5EX14MBXC140.redmond.corp.microsoft.com>
On Monday, July 12, 2010 2:31 PM, Darin Fisher wrote:
> On Mon, Jul 12, 2010 at 9:59 AM, David Levin <levin@google.com> wrote:
> On Mon, Jul 12, 2010 at 9:54 AM, Adrian Bateman <adrianba@microsoft.com>
> wrote:
> I read point #5 to be only about surviving the start of a navigation. As a
> web developer, how can I tell when a load has started for an <img>? Isn't
> this similarly indeterminate.
> 
> As soon as img.src is set.
> 
> "the spec could mention that the resource pointed by blob URL should be
> loaded successfully as long as the blob URL is valid at the time when the
> resource is starting to load."
> 
> Should apply to xhr (after send is called), img, and navigation.
> 
> Right, it seems reasonable to say that ownership of the resource referenced
> by a Blob can be shared by a XHR, Image, or navigation once it is told to
> start loading the resource.
> 
> -Darin

It sounds like you are saying the following is guaranteed to work:

img.src = blob.url;
window.revokeBlobUrl(blob);
return;

If that is the case then the user agent is already making the guarantees
I was talking about and so I still think having the lifetime mapped to the blob
not the document is better. This means that in the general case I don't have
to worry about lifetime management.

Adrian.
Received on Tuesday, 13 July 2010 13:51:54 GMT

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