[Bug 25302] Blob objects should have a keepalive list of objects

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25302

--- Comment #6 from Arun <arun@mozilla.com> ---
(In reply to Glenn Maynard from comment #1)
> When a fetch is started, it can effectively slice() the blob it was told to
> fetch, and close() its slice when it's done.  This can probably be part of
> the logic that prevents fetches from being affected by blob URLs being
> revoked.  In pseudocode:
> 
> fetch(resource):
>     if resource is a blob URL:
>         // Get the blob, to isolate us from the user revoking the blob URL.
>         resource = getBlobFromUrl(resource)
> 
>     try:
>         if resource is a blob:
>             // We were given either a blob URL or a blob.  Slice the blob,
>             // to isolate us from the user closing it.
>             resource = resource.slice()
>         // do the fetch ...
>     finally:
>         if resource is a blob:
>             // Close the blob we sliced, so we don't prevent the underlying
>             // storage from being reclaimed.
>             resource.close()


This seems like a good proposal. But now my questions are:

1.Should File API specify this? In bug 25081 Comment 7 I ask if this is an
implementation detail, but now I think it should be spec'd as part of the
FormData or Fetch or URL specs.

2. Should this idea supplant the idea of a keepalive list of objects that read
from the Blob? Anne?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 10 April 2014 14:45:23 UTC