Created attachment 569927 [details]
Steps to reproduce:
1. Download the attachment.
2. Open the attachment on the local volume (file:// URLs).
error event will be fired.
Oddly, .response will return Blob object despite the failure.
load event should be fired (load shouls success).
This test will not fail on the network (http:// URLs).
Created attachment 569928 [details] [diff] [review]
Seekable streams will complain if OnDataAvailable succeeded but didn't consume the data.
> Seekable streams will complain if OnDataAvailable succeeded but didn't consume the data.
Not just seekable streams. The OnDataAvailable contract is very clear: if it does not consume the data it needs to throw. Says so right in the interface documentation.
(In reply to Rocco Stilo from comment #3)
Does your build contain a patch of bug 689008? It was pushed very recently.
Anyway, the current code should be fixed because it violates the nsIStreamListener contract as bz pointed out.
> * be read without blocking the calling thread. The onDataAvailable impl
> * must read exactly |aCount| bytes of data before returning.
Created attachment 569970 [details] [diff] [review]
Updated a comment according to bz's advice.
Created attachment 570108 [details] [diff] [review]
patch for check in
In my queue, which is going via try then onto inbound: