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

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

--- Comment #9 from Arun <arun@mozilla.com> ---
(In reply to Simon Pieters from comment #7)
> close() says to "Set the size of the context object to 0." but then reading
> size also says "If the Blob has a readability state of CLOSED then size must
> return 0." -- one of those seems unnecessary.


It's not overlapping redundancy right now (e.g. one doesn't overwrite the
other), but I can change this to be in one place :-)


> 
> It's not clear to me what happens when an async read is started and the blob
> is closed in the same script. (Seems like it would fail to find the byte
> sequence since it is removed before the read starts?)


What should happen here IMHO is that if the read is underway, close() shouldn't
have an effect. Of course, subsequent async reads will fail.

This should be made clearer. I don't think we can/should disrupt a read that's
underway. Do you agree?

> 
> Do we want createObjectURL(closedBlob) to throw? Comment 1 seems to suggest
> it shouldn't throw.

This should not throw:

var blob = new Blob(); URL.createObjectURL(blob); blob.close();
(This is a non-neutered 0 bytes Blob).

This should throw:

var blob = new Blob(); blob.close(); URL.createObjectURL(blob);


I'm not sure I agree with Comment 1, but would appreciate input from Anne.

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

Received on Friday, 28 February 2014 18:13:58 UTC