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

2012-09-13 Thread Arun Ranganathan
On Sep 11, 2012, at 1:07 AM, Cameron McCormack wrote: > Arun Ranganathan: >> I've pinged heycam to see if this is a proper use of the sequence type. I'm >> not sure it allows for such a variation in parameters. > > I agree with Boris, it makes sense to use sequence<> here. Whenever you just

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

2012-09-10 Thread Cameron McCormack
Arun Ranganathan: I've pinged heycam to see if this is a proper use of the sequence type. I'm not sure it allows for such a variation in parameters. I agree with Boris, it makes sense to use sequence<> here. Whenever you just want to take a list of values in an operation argument, and you

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

2012-09-10 Thread Boris Zbarsky
On 9/10/12 6:36 PM, Arun Ranganathan wrote: I've pinged heycam to see if this is a proper use of the sequence type. I'm not sure it allows for such a variation in parameters. Sequence allows any WebIDL type as a sequence element. So for example, you can do this: sequence<(sequence<(DOMStr

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

2012-09-10 Thread Arun Ranganathan
I've pinged heycam to see if this is a proper use of the sequence type. I'm not sure it allows for such a variation in parameters. -- A* On Sep 9, 2012, at 2:31 PM, Boris Zbarsky wrote: > On 9/9/12 12:13 PM, Glenn Maynard wrote: >>In particular, a Blob represents immutable binary data. Th

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

2012-09-09 Thread Boris Zbarsky
On 9/9/12 12:13 PM, Glenn Maynard wrote: 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. That do

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

2012-09-09 Thread Glenn Maynard
On Sun, Sep 9, 2012 at 9:34 AM, Boris Zbarsky wrote: > 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. > T

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

2012-09-09 Thread Boris Zbarsky
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 arra