[Bug 25343] Expose an isClosed property on Blob Objects

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

--- Comment #6 from Arun <arun@mozilla.com> ---
(In reply to Glenn Maynard from comment #5)
> Just throw away the blob after closing it.
> 
> this.my_blob.close();
> this.my_blob = null;


In this case, you're setting the Blob to null, and code might do a null check
(or an if not null check). This certainly makes it unnecessary to have a
property like isClosed, but it is still a check! isClosed explicitly checks for
closed.


> 
> It's just like how you don't need to test if a file descriptor is closed,
> you just don't hang onto them after you close them.


In the example with textures, you might hang on to it *till* it's closed.


> 
> (Again, I don't think this is harmful and I don't mean to push against it, I
> just want to know that there's a reason to add it...)


I'd like other use cases, too, but I think it's useful to have.

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

Received on Thursday, 24 April 2014 20:46:11 UTC