Move IO stream handling to DOM streams
Categories
(Remote Protocol :: CDP, task, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
Details
To support a variety of stream types (like Fetch, Blob, File) in the future we should make use of the DOM streams API. This decision came out from the review of https://phabricator.services.mozilla.com/D55968, but might need more work to do. As such it has been filed as a follow-up bug to not block us from getting the File streaming out.
Things to care about here:
- Use
File.createFromNsIFile(your nsIFile)
to create a DOM file instance, and it'sstream()
method for fetching the stream. - Use
stream.getReader()
to work with the actual stream. See this review comment for details. seek
is not implemented for reader, so would have to write our own implementation- What happens with overlapping calls to
IO.read
?
Reporter | ||
Comment 1•5 years ago
|
||
When I filed a crash bug for Chromium in regards IO.read
for negative size
I noticed the following test file for blobs:
They create testable blob streams via evaluate
and IO.resolveBlob
.
Reporter | ||
Comment 2•5 years ago
|
||
When moving to the new API we should try to also limit the amount of open file handles. Lets see how we could handle that with DOM streams, also by having the performance in mind. We don't want to close and reopen, and seek for each and every read call.
Assignee | ||
Updated•4 years ago
|
Updated•2 years ago
|
Reporter | ||
Comment 3•1 year ago
|
||
We are not going to implement this API for our CDP support.
Description
•