Closed Bug 1810107 Opened 2 years ago Closed 1 years ago

[meta] Figure out a (better) way to hook nsIAsyncInput/OutputStream to Readable/WritableStream

Categories

(Core :: DOM: Streams, enhancement)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: saschanaz, Unassigned)

References

Details

(Keywords: meta)

Currently dom/base/BodyStream works as a converter from nsIInputStream to ReadableStream, owning the ReadableStream and enqueueing data to it, and is used by Fetch and Blob::Stream. Which currently works, but it's weird to have BodyStreamUnderlyingSourceAlgorithms solely to pass everything to BodyStream. Those should be merged IMO.

Some note:

  1. https://fetch.spec.whatwg.org/#concept-bodyinit-extract corresponds to https://searchfox.org/mozilla-central/rev/893a8f062ec6144c84403fbfb0a57234418b89cf/dom/fetch/Fetch.cpp#958, but it extracts nsIInputStream instead of ReadableStream and it then passes it to BodyStream to get a ReadableStream. That's a space for refactoring.
Depends on: 1811882
Depends on: 1813011
Depends on: 1813013
Summary: Figure out a (better) way to hook nsIAsyncInput/OutputStream to Readable/WritableStream → [meta] Figure out a (better) way to hook nsIAsyncInput/OutputStream to Readable/WritableStream
Depends on: 1813072
See Also: → 1538754
See Also: 1538754
Depends on: 1811440

This is done by bug 1811882. Bug 1811440 can be tracked outside of this.

Status: NEW → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.