Skip to content

WasmFS: Use "readwrite-unsafe" in OPFS backend #21869

@tlively

Description

@tlively

Currently the OPFS backend for WasmFS only uses SyncAccessHandles when files are opened for reading and writing. The reason we don't use SyncAccessHandles for read-only files is to support the use case of opening a file for reading from multiple tabs simultaneously; SyncAccessHandles acquire a file lock that allows a file to be opened by only a single agent at at time. However, there is a new "readwrite-unsafe" option that can be used with SyncAccessHandles that would allow them to be opened from multiple tabs. When this option is available, we should always use it no matter what mode the file is opened in.

https://developer.chrome.com/blog/new-dev-trial-for-multiple-readers-and-writers/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions