[Bug 28496] Allow Blob constructor to take ownership of ArrayBuffer(View) / invoke DetachArrayBuffer

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

Andrew Sutherland <bugmail@asutherland.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jonas@sicking.cc
              Flags|                            |needinfo?(jonas@sicking.cc)

--- Comment #4 from Andrew Sutherland <bugmail@asutherland.org> ---
I might have erred too much on the side of describing our specific use-case, so
I'll step back from that, but it's worth noting that these are issues facing
all JS code trying to do app-y things, even if different nonstandard APIs are
used.  For example, Google Chrome's 2nd nonstandard TCP API likewise provides
an ArrayBuffer with no possibility of using readInfo semantics:
https://developer.chrome.com/apps/sockets_tcp#event-onReceive

I think the argument would be analogous to that for the addition of close() to
Blob in the first place.  Jonas Sicking made the argument in bug 16952 comment
2:

> Blobs represent a potentially large amount of data, which in best case is on
> disk, worst case in memory, in both cases expensive on mobile.
> 
> It's generally a bad idea to rely on GC for managing expensive resources. (I
> believe that is a quote from Darin Fisher, but don't quote me on that :) ).

Analogously, if you create a memory-backed Blob and you can get rid of the
Blob, why can't you get rid of its constituents, or ideally (as requested
here), transfer ownership to the Blob in the first case.

ni'ing Jonas for his thoughts here.

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

Received on Thursday, 16 April 2015 00:38:41 UTC