[whatwg] IE10 inconsistency with Blob / createObjectURL

Apologies if this has come up on the list before:

IE10 appears to have shipped implementations of the Blob constructor along
with createObjectURL. While they work, there appears to be a significant
deviation from the spec behavior (at the very least, Firefox and Chrome
implement these APIs as I'd expect).

When a Blob gets GCed in IE10, it appears to intentionally destroy the
object URL associated with it, instead of waiting for you to revoke the
object URL. When this happens it spits out a vague console message:

HTML7007: One or more blob URLs were revoked by closing the blob for which
they were created. These URLs will no longer resolve as the data backing
the URL has been freed.

This is confusing because the API doesn't even have a way to 'close' blobs;
all that is necessary to trigger this is to let a Blob get collected by
going out of scope.

>From reading the spec I don't see any language that suggests this behavior
is allowed or expected. I can try to work around it by retaining all the
blobs but it seems unnecessary...

-kg

Received on Saturday, 1 February 2014 02:50:02 UTC