Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 08343037ad9b7c9a6c75d6c51a791755a7522e4c https://github.com/WebKit/WebKit/commit/08343037ad9b7c9a6c75d6c51a791755a7522e4c Author: Yusuke Suzuki <ysuz...@apple.com> Date: 2022-12-20 (Tue, 20 Dec 2022)
Changed paths: M LayoutTests/storage/filesystemaccess/resources/sync-access-handle-read-write.js M LayoutTests/storage/filesystemaccess/sync-access-handle-read-write-worker-expected.txt M Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp M Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.h M Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.idl Log Message: ----------- 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 _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes