W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: [FileAPI] Result of calling MultipleReads on FileReader

From: Glenn Maynard <glenn@zewt.org>
Date: Mon, 11 Apr 2011 13:35:46 -0400
Message-ID: <BANLkTinbJD_RXnfAZfKQAx_knre1dn0gNg@mail.gmail.com>
To: arun@mozilla.com
Cc: Adrian Bateman <adrianba@microsoft.com>, Eric Uhrhane <ericu@google.com>, "Web Applications Working Group WG (public-webapps@w3.org)" <public-webapps@w3.org>, "Jonas Sicking (jonas@sicking.cc)" <jonas@sicking.cc>, Arun Ranganathan <aranganathan@mozilla.com>
On Mon, Apr 11, 2011 at 1:28 PM, Arun Ranganathan <arun@mozilla.com> wrote:
>
>  > On the main thread, with your proposal, all reads will stop since an
> exception has been raised.
>
> That's odd--why would that happen?  Normally one expects an API call that
> throws an exception to have no effect.  It'd be particularly strange if some
> exceptions cancel the previous read and others didn't.
>
>  I'm sorry, I'm misunderstanding.  Seems like the behavior with exceptions
> is that if there are multiple reads, previous ones raise exceptions, but
> that the latest is processed (assuming no errors, etc.).  Is that correct?
>

I interpreted what you said to mean that if you did this:

fr.readAsBinaryString(blob1);
fr.readAsDataURL(blob2);

and the readAsDataURL call raised an exception (not an error event), the
operation started by readAsBinaryString would stop.

I think that here, readAsDataURL should throw an exception, and the
readAsBinaryString's operation should continue as if readAsDataURL was never
called.

-- 
Glenn Maynard
Received on Monday, 11 April 2011 17:36:13 GMT

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