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
A save's OPFS session is torn down on a fixed 120 s timer; a sibling prune can then delete the file under an in-flight or reused download #134
close() stops the worker's heartbeat and deliberately leaves the session directory. prune() in any later init() (a player opening in another tab, the next save's own new FSBlob(), a merger) removes a directory whose heartbeat is older than 10 s. The result File (getSavedFile) and, on the non-OPFS merger paths, the getBlob(id) Files inside the returned Blob, are all backed by that directory. SaveManager keeps this.downloadURL for re-use.
Failure scenario
Save a 4 GB MP4 to a slow USB stick (Firefox copies a blob at tens of MB/s, so more than three minutes). At 120 s the worker closes; a player opening in another tab at 130 s prunes the session; the download is interrupted with no message. The same for a second click on Save for the same source after two minutes once any other FSBlob has initialised: the reused URL points at deleted files.
Suggested fix
Close the blob manager from the completion path revokeWhenDownloaded already tracks (give it a callback, or return a promise that settles when downloads.onChanged reports the download over) instead of a timer; revoke the reusable URL when its backing manager closes.
Confidence: medium-high (the prune timing is in the code; the long-download trigger is environmental).
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