You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
writeFSAToStream neither awaits writer.close() nor aborts the stream on failure #136
Where:chrome/player/utils/FastStreamArchiveUtils.mjs (writeFSAToStream, the final writer.close();), caller chrome/player/ui/SaveManager.mjs (dumpBuffer)
What happens
writer.close(); at the end of writeFSAToStream is not awaited, and the throw new Error('Entry is not complete!') and any getDataFromBlob/write rejection leave the writer locked and the OPFS save stream (saveBegin's open sync access handle in StreamSaver) open. dumpBuffer shows player_archiver_saved right after writeFSAToStream resolves.
Failure scenario
The "saved" message appears before the OPFS saveEnd/downloadURL have even run; a failure in the sink's close() (quota, download refused) becomes an unhandled rejection with no status message. On a thrown error the StreamSaver's FSBlob worker, session directory and open handle live until the tab closes.
Suggested fix
await writer.close() inside the try; await writer.abort(e) in a catch before rethrowing.
Confidence: high.
From a line-by-line code review of the tree at 41363fd (2026-10-02). Each claim above was checked against the source before filing; the reproduction steps and line references are as of that commit.
Activity