Closed Bug 1804614 Opened 2 years ago Closed 2 years ago

Refactor nsIInputStream to nsIOutputStream write handler of FileSystemWritableFileStream

Categories

(Core :: DOM: File, task, P4)

task

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jari, Unassigned)

References

Details

The file dom/fs/api/FileSystemWritableFileStream.cpp has a function which writes data from nsIInputStream to an nsIOutputStream which is backed by a disk. As this involves IO, the write must be dispatched to an IO grade thread, and the completion of the operation must be connected to a user-facing awaitable.

Additionally, at least errors from streams whose underlying files which have been deleted, and from streams whose copying cannot be done synchronously must be handled.

The goal of this bug is to split this large function into appropriately named factors, each of which can be quickly verified to implement a suboperation which is depends only on a small subset of all the variables in the outer context.

Depends on: 1791332
Depends on: 1798513
No longer depends on: 1791332

The impacted function has been refactored many times since this bug was created and the related TODO comment goes away with 1857155.

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