+77
−45
Loading
Before these changes, there were a number of cases where it would be possible for the pipe to be closed or otherwise encounter an error, and for there to be a very large or potentially indefinite delay before that error is reported to the ReadableStream. This patch avoids changing too much of the structure of the existing FetchStreamReader's design, while avoiding the potential pitfalls, and ensuring that the stream is being consistently watched. A more polished patch in the future may be able to perform a more efficient and direct adaptation from a `ReadableStream` or `WritableStream` to the `nsIAsyncInputStream` and `nsIAsyncOutputStream` types, but that was not tackled here. Differential Revision: https://phabricator.services.mozilla.com/D168481