W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2012

RE: [FileAPI] Deterministic release of Blob proposal

From: Feras Moussa <ferasm@microsoft.com>
Date: Wed, 7 Mar 2012 23:56:50 +0000
To: Charles Pritchard <chuck@jumis.com>
CC: Arun Ranganathan <aranganathan@mozilla.com>, Adrian Bateman <adrianba@microsoft.com>, "public-webapps@w3.org" <public-webapps@w3.org>, Ian Hickson <ian@hixie.ch>, Anne van Kesteren <annevk@opera.com>
Message-ID: <1BF800349B6CDF4C82313F8D9EF3239D03E0A20B@TK5EX14MBXC273.redmond.corp.microsoft.com>
> Then let's try this again.
> var a = new Image();
> a.onerror = function() { console.log("Oh no, my parent was neutered!"); }; a.src = URL.createObjectURL(blob); blob.close();
> Is that error going to hit?
I documented this in my proposal, but in this case the URI would have 
been minted prior to calling close. The Blob URI would still resolve 
until it has been revoked, so in your example onerror would not be hit 
due to calling close.

> var a = new Worker('#');
> a.postMessage(blob);
> blob.close();
> Is that blob going to make it to the worker?
SCA runs synchronously (so that subsequent changes to mutable values 
in the object don't impact the message) so the blob will have been 
cloned prior to close. 
The above would work as expected.
Received on Wednesday, 7 March 2012 23:57:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:31 UTC