Bug 1057175. If ReadSegments returns a failure code it might not send any data to RasterImage, so check for return value. r=seth

We can hit this if the input stream gets closed before we can read from it. In the case I debugged the image was removed from the DOM (by having it's containing document removed from the DOM) so it's request was cancelled. ReadSegments on a closed stream (at least a cache file input stream) just returns and does nothing.