Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FileSystemSyncAccessHandle::{read,write}'s option should be optional
https://bugs.webkit.org/show_bug.cgi?id=249631 rdar://103541719 Reviewed by Justin Michaud. The current FileSystemSyncAccessHandle::{read,write} implementation has a bug that `options` parameter is specified as mandatory. As a result, these APIs throw errors because it is using `read` / `write` functions without options. This patch fixes the implementation to make them optional. When optional `at` is not found, then the behavior is using the current file position's cursor. Thus, we just skip seekFile if it is not specified. * LayoutTests/storage/filesystemaccess/resources/sync-access-handle-read-write.js: (write): (read): (async test): * LayoutTests/storage/filesystemaccess/sync-access-handle-read-write-worker-expected.txt: * Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp: (WebCore::FileSystemSyncAccessHandle::read): (WebCore::FileSystemSyncAccessHandle::write): * Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.h: * Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.idl: Canonical link: https://commits.webkit.org/258160@main
- Loading branch information
1 parent
4d0e3a4
commit 0834303
Showing
5 changed files
with
33 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters