- 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>
> 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