Closed Bug 1761370 Opened 3 years ago Closed 2 years ago

Unshared FilesystemSyncAccessHandle r/w test implementation

Categories

(Core :: DOM: File, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- affected

People

(Reporter: jesup, Assigned: jesup)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(6 files, 8 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Provide an initial working read/write FilesystemSyncAccessHandle implementation for use in Workers, in dom/fs/FileSystemSyncAccessHandle.cpp

See for example https://github.com/WICG/file-system-access/blob/main/AccessHandle.md

Depends on: 1768882
Attachment #9275295 - Attachment description: WIP: Bug 1761370: Add SyncAccessHandles to OPFS r=jari,asuth,#dom-storage-reviewers → Bug 1761370: Add SyncAccessHandles to OPFS r=jari,asuth,#dom-storage-reviewers
Blocks: 1768050
Attachment #9275507 - Attachment description: WIP: Bug 1761370: Add locking across multiple connections in OPFS r=#dom-storage-reviewers,jari → Bug 1761370: Add locking across multiple connections in OPFS r=#dom-storage-reviewers,jari
Attachment #9275303 - Attachment description: WIP: Bug 1761370: Add HashMap of OPFS Parents for use in locking and cleanup r=#dom-storage-reviewers,jari → Bug 1761370: Add HashMap of OPFS Parents for use in locking and cleanup r=#dom-storage-reviewers,jari
Attachment #9275295 - Attachment description: Bug 1761370: Add SyncAccessHandles to OPFS r=jari,asuth,#dom-storage-reviewers → Bug 1761370: Add SyncAccessHandles to OPFS r=janv,jari,asuth,#dom-storage-reviewers
Attachment #9275303 - Attachment description: Bug 1761370: Add HashMap of OPFS Parents for use in locking and cleanup r=#dom-storage-reviewers,jari → Bug 1761370: Add HashMap of OPFS Parents for use in locking and cleanup r=#dom-storage-reviewers,jari,janv
Attachment #9275507 - Attachment description: Bug 1761370: Add locking across multiple connections in OPFS r=#dom-storage-reviewers,jari → Bug 1761370: Add locking across multiple connections in OPFS r=#dom-storage-reviewers,jari,janv

We'll need to block pages using OPFS from the BFCache (https://github.com/whatwg/fs/issues/17)

This patch fixes a compilation error and is intended to be folded into D145791.

Comment on attachment 9277616 [details]
Bug 1761370: Add support for getFile() to FileSystemHandles in OPFS r=#dom-storage-reviewers,janv

Revision D146986 was moved to bug 1761089. Setting attachment 9277616 [details] to obsolete.

Attachment #9277616 - Attachment is obsolete: true
Attachment #9281174 - Attachment is obsolete: true

This is meant to be merged into D148267 "Add SyncAccessHandles to OPFS"

Attachment #9290521 - Attachment is obsolete: true
Attachment #9293488 - Attachment is obsolete: true
Attachment #9293408 - Attachment description: WIP: Bug 1761370 - Add FileSystemHandle::ValidPath; r=#dom-storage → Bug 1761370 - Add ValidPath() for OPFS r=#dom-storage
Attachment #9293408 - Attachment description: Bug 1761370 - Add ValidPath() for OPFS r=#dom-storage → Bug 1761370 - Add IsValidName() for OPFS r=#dom-storage
Attachment #9293795 - Attachment is obsolete: true
Pushed by rjesup@wgate.com: https://hg.mozilla.org/integration/autoland/rev/e2071b21f532 Add IsValidName() for OPFS r=janv https://hg.mozilla.org/integration/autoland/rev/a1923876b4df Make sure we are on correct thread when handling messages from the child; r=dom-storage-reviewers,jari https://hg.mozilla.org/integration/autoland/rev/aa682026c2d5 Add [Throws] annotation for `read` and `write` in FileSystemSyncAccessHandle; r=dom-storage-reviewers,janv,smaug https://hg.mozilla.org/integration/autoland/rev/7c1a069706de Add SyncAccessHandles to OPFS r=dom-storage-reviewers,jari,janv
Pushed by rjesup@wgate.com: https://hg.mozilla.org/integration/autoland/rev/f8b472462d48 Add IsValidName() for OPFS r=janv https://hg.mozilla.org/integration/autoland/rev/9b1cb4b7d5e2 Make sure we are on correct thread when handling messages from the child; r=dom-storage-reviewers,jari https://hg.mozilla.org/integration/autoland/rev/c4555c4937a9 Add [Throws] annotation for `read` and `write` in FileSystemSyncAccessHandle; r=dom-storage-reviewers,janv,smaug https://hg.mozilla.org/integration/autoland/rev/4eedec454db1 Add SyncAccessHandles to OPFS r=dom-storage-reviewers,jari,janv

Backed out for causing wpt failures . CLOSED TREE
Backout link
Push with failures
Link to failure log 1
Link to failure log 2
Failure line 1 : TEST-UNEXPECTED-FAIL | /fs/FileSystemDirectoryHandle-removeEntry.https.any.worker.html | removeEntry() while the file has an open writable fails - promise_test: Unhandled rejection with value: object "TypeError: navigator.storage.getDirectory is not a function"
Failure line 2 : TEST-UNEXPECTED-FAIL | /fs/FileSystemDirectoryHandle-removeEntry.https.any.html | removeEntry() while the file has an open writable fails - promise_test: Unhandled rejection with value: object "TypeError: navigator.storage.getDirectory is not a function"

Pushed by rjesup@wgate.com: https://hg.mozilla.org/integration/autoland/rev/8bb8c4b1614e Add IsValidName() for OPFS r=janv https://hg.mozilla.org/integration/autoland/rev/1193594d1bb1 Make sure we are on correct thread when handling messages from the child; r=dom-storage-reviewers,jari https://hg.mozilla.org/integration/autoland/rev/4058c1a74e18 Add [Throws] annotation for `read` and `write` in FileSystemSyncAccessHandle; r=dom-storage-reviewers,janv,smaug https://hg.mozilla.org/integration/autoland/rev/249ebf125b3f Add SyncAccessHandles to OPFS r=dom-storage-reviewers,jari,janv

Backed out for causing FileSystem related wpt failures

Backout link

Push with failures

Failure log

Failed to create upstream wpt PR due to merge conflicts. This requires fixup from a wpt sync admin.
Pushed by rjesup@wgate.com: https://hg.mozilla.org/integration/autoland/rev/473e3fe83dc9 Add IsValidName() for OPFS r=janv https://hg.mozilla.org/integration/autoland/rev/b25dd706fa23 Make sure we are on correct thread when handling messages from the child; r=dom-storage-reviewers,jari https://hg.mozilla.org/integration/autoland/rev/dbbf940538fa Add [Throws] annotation for `read` and `write` in FileSystemSyncAccessHandle; r=dom-storage-reviewers,janv,smaug https://hg.mozilla.org/integration/autoland/rev/ee048ee96921 Add SyncAccessHandles to OPFS r=dom-storage-reviewers,jari,janv
Status: RESOLVED → REOPENED
Keywords: leave-open
Resolution: FIXED → ---
Attachment #9289795 - Attachment is obsolete: true
Attachment #9275303 - Attachment is obsolete: true
Attachment #9275507 - Attachment is obsolete: true
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Flags: needinfo?(rjesup)
Resolution: --- → FIXED
Depends on: 1790828
Depends on: 1790876
Depends on: 1790907

A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)

No longer depends on: 1790907
Pushed by jvarga@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/54d92679d430 Fix bad formatting in FileSystemManagerParent::RecvGetAccessHandle and FileSystemManagerParent::RecvGetFile; r=dom-storage-reviewers,jesup
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/36034 for changes under testing/web-platform/tests
Upstream PR was closed without merging
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: