[Webkit-unassigned] [Bug 250495] New: FileSystemSyncAccessHandle does not flush data

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 11 19:57:04 PST 2023


https://bugs.webkit.org/show_bug.cgi?id=250495

            Bug ID: 250495
           Summary: FileSystemSyncAccessHandle does not flush data
           Product: WebKit
           Version: Safari 16
          Hardware: All
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Website Storage
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: 03_placid_daft at icloud.com
                CC: sihui_liu at apple.com

With many attempts, I could not find a way to persist written data to FileSystemSyncAccessHandle.
The example from https://webkit.org/blog/12257/the-file-system-access-api-with-origin-private-file-system/ article works only if you try to getFile/read data from the same instance of FileSystemFileHandle, when you get a new instance of FileHandle all data disappears.

This can be easily reproduced with a slight modification to the existing LayoutTest at: https://github.com/WebKit/WebKit/blob/3729059e6a040c8c168679975c9d04dab48e5a4d/LayoutTests/storage/filesystemaccess/resources/file-handle-getfile.js#L44

If before `fileObject = await fileHandle.getFile();` line you place `fileHandle = await rootHandle.getFileHandle("file-handle-getfile.txt", { "create" : false });` you will not get any actual data in return, even if you add accessHandle.flush() call before accessHandle.close();

This works perfectly fine in Chrome but not in WebKit.

FileSystemSyncAccessHandle is the only available way to write data in WebKit but it's not working because it does not persist data.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230112/74bd4968/attachment-0001.htm>


More information about the webkit-unassigned mailing list