W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2012

[FileAPI] Blob constructor should probably take a sequence, not an IDL array object

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 09 Sep 2012 10:34:01 -0400
Message-ID: <504CA8D9.5060301@mit.edu>
To: public-webapps@w3.org
In particular, a Blob represents immutable binary data.  That means that 
it has to copy the input anyway.  Given that, it doesn't make sense to 
pass the input by reference if the caller _does_ happen to have an 
WebIDL array object.

But worse yet, actual real-life callers call this with JS arrays.  So 
the current IDL forces creation of a new WebIDL array object which is 
then thrown away because Blob makes a copy of the data anyway.  Seems 
like a waste.

-Boris
Received on Sunday, 9 September 2012 14:34:28 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:54 GMT