[Bug 24576] Calling URL.createObjectURL() on a closed Blob

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

Anne <annevk@annevk.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |25081

--- Comment #22 from Anne <annevk@annevk.nl> ---
So we want something that works for bug 25081 comment 6.

If a blob that is closed simply loses the reference to its underlying source
and returns an empty byte sequence, that does not seem great for FormData as it
would be somewhat racy. However, returning the empty byte sequence if its
closed seems good.

Maybe blobs should have a keepalive list of objects. Then at the point where a
FormData object (FD) is serialized, FD adds itself to the keepalive list. Then
when FD starts reading from the blob it passes itself as a parameter to read
and is allowed to bypass the closed check and reach the source because it is on
the keepalive list. Then once the read completes FD removes itself from the
list and if the blob is closed and has an empty keepalive list it can GC.

Does that model make sense?

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

Received on Thursday, 27 March 2014 14:34:35 UTC