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 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 14:37:00 UTC