Re: File API: reading a Blob

On Thu, Jul 3, 2014 at 3:58 PM, Arun Ranganathan <arun@mozilla.com> wrote:
> You’ve since changed your mind, which is totally fine

I wish I could foresee all problems before starting to write things
out, that'd be great! :-)


> but overhauling the current read operation for a change
> of mind/model is a lot of pain without elegant gain.

Well, it does seem like a problem that synchronous and asynchronous
operations have different error handling as far as what bytes they
return is concerned.


> But if it IS a problem — that is, if you think synchronous I/O has
> implications outside of FileReaderSync, OR that FileReaderSync’s return
> itself should be partial if a failure occurs, then let’s file bugs and solve
> them.

So most of Fetch is asynchronous. If it's invoked with the synchronous
flag set it's just that it waits for the entire response before
returning. That's why I'd like to use the asynchronous path of reading
a blob. But I'd like that not to be observably different from using
the synchronous path of reading a blob. That seems wrong.


-- 
http://annevankesteren.nl/

Received on Thursday, 3 July 2014 14:17:41 UTC