Re: File API: closed Blob objects

On Mon, Dec 16, 2013 at 9:54 AM, Anne van Kesteren <annevk@annevk.nl> wrote:

> On Mon, Dec 16, 2013 at 3:48 PM, Glenn Maynard <glenn@zewt.org> wrote:
> > Also, you can close() a Blob while an async XHR is taking place on it.
>
> Yeah, for that to be clear the model blobs are using needs to be much
> better defined. To make it clear what the order of steps here is.
>
>
> > It also means you can say xhr.open("GET", blobURL); blob.close(); and
> have it work sensibly
>
> You can still have an IO error of sorts so there needs to be an
> underlying model that describes blob read operations upon which the
> blob API is layered. XMLHttpRequest and other consumers can then use
> the underlying model rather than the vague language we have now.
>

What I meant is that it would be good for the above pattern to work, and
not cause an IO error.  For example, you can have a black-box API call that
takes a blob or a blob URL, and happens to start an XHR inside the black
box.  The caller of the API can close the blob (or revoke the blob URL)
after calling into the API without interfering with the XHR that it doesn't
know about.

-- 
Glenn Maynard

Received on Monday, 16 December 2013 16:08:13 UTC