Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Make all FileSystemSyncAccessHandle methods sync
https://bugs.webkit.org/show_bug.cgi?id=247071 rdar://problem/101620396 Reviewed by Youenn Fablet. To match latest spec: https://fs.spec.whatwg.org/#api-filesystemsyncaccesshandle. Chrome has already shipped it. * LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemSyncAccessHandle-flush.https.tentative.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemSyncAccessHandle-getSize.https.tentative.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fs/FileSystemSyncAccessHandle-truncate.https.tentative.worker-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/fs/idlharness.https.any.worker-expected.txt: * LayoutTests/storage/filesystemaccess/resources/sync-access-handle-basics.js: * LayoutTests/storage/filesystemaccess/resources/sync-access-handle-close.js: (testFunction): (testFunctions): (async testMultipleHandles): (async test): (testSyncFunction): Deleted. (async testAsyncFunction): Deleted. (async testFunctions): Deleted. * LayoutTests/storage/filesystemaccess/resources/sync-access-handle-read-write.js: (async test): * LayoutTests/storage/filesystemaccess/sync-access-handle-close-worker-expected.txt: * LayoutTests/storage/filesystemaccess/sync-access-handle-read-write-worker-expected.txt: * Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp: (WebCore::FileSystemFileHandle::createSyncAccessHandle): (WebCore::FileSystemFileHandle::closeSyncAccessHandle): * Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.h: * Source/WebCore/Modules/filesystemaccess/FileSystemStorageConnection.h: * Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp: (WebCore::FileSystemSyncAccessHandle::~FileSystemSyncAccessHandle): (WebCore::FileSystemSyncAccessHandle::truncate): (WebCore::FileSystemSyncAccessHandle::getSize): (WebCore::FileSystemSyncAccessHandle::flush): (WebCore::FileSystemSyncAccessHandle::close): (WebCore::FileSystemSyncAccessHandle::closeInternal): (WebCore::FileSystemSyncAccessHandle::read): (WebCore::FileSystemSyncAccessHandle::write): (WebCore::FileSystemSyncAccessHandle::stop): (WebCore::FileSystemSyncAccessHandle::invalidate): (WebCore::FileSystemSyncAccessHandle::isClosingOrClosed const): Deleted. (WebCore::FileSystemSyncAccessHandle::closeFile): Deleted. (WebCore::FileSystemSyncAccessHandle::didCloseFile): Deleted. (WebCore::FileSystemSyncAccessHandle::closeBackend): Deleted. (WebCore::FileSystemSyncAccessHandle::didCloseBackend): Deleted. (WebCore::FileSystemSyncAccessHandle::completePromise): Deleted. * Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.h: * Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.idl: * Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp: (WebCore::WorkerFileSystemStorageConnection::closeSyncAccessHandle): * Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.h: * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.cpp: (WebKit::NetworkStorageManager::closeSyncAccessHandle): * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.h: * Source/WebKit/NetworkProcess/storage/NetworkStorageManager.messages.in: * Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.cpp: (WebKit::WebFileSystemStorageConnection::closeSyncAccessHandle): * Source/WebKit/WebProcess/WebCoreSupport/WebFileSystemStorageConnection.h: Canonical link: https://commits.webkit.org/258473@main
- Loading branch information
Showing
23 changed files
with
114 additions
and
299 deletions.
There are no files selected for viewing
12 changes: 6 additions & 6 deletions
12
...eb-platform-tests/fs/FileSystemSyncAccessHandle-close.https.tentative.worker-expected.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
|
||
FAIL SyncAccessHandle.close is idempotent assert_equals: expected (undefined) undefined but got (object) object "[object Promise]" | ||
FAIL SyncAccessHandle.read fails after SyncAccessHandle.close assert_equals: expected (undefined) undefined but got (object) object "[object Promise]" | ||
FAIL SyncAccessHandle.write fails after SyncAccessHandle.close assert_equals: expected (undefined) undefined but got (object) object "[object Promise]" | ||
FAIL SyncAccessHandle.flush fails after SyncAccessHandle.close assert_equals: expected (undefined) undefined but got (object) object "[object Promise]" | ||
FAIL SyncAccessHandle.getSize fails after SyncAccessHandle.close assert_equals: expected (undefined) undefined but got (object) object "[object Promise]" | ||
FAIL SyncAccessHandle.truncate fails after SyncAccessHandle.handle.close assert_equals: expected (undefined) undefined but got (object) object "[object Promise]" | ||
FAIL SyncAccessHandle.close is idempotent promise_test: Unhandled rejection with value: object "InvalidStateError: AccessHandle is closed" | ||
FAIL SyncAccessHandle.read fails after SyncAccessHandle.close promise_test: Unhandled rejection with value: object "InvalidStateError: AccessHandle is closed" | ||
FAIL SyncAccessHandle.write fails after SyncAccessHandle.close promise_test: Unhandled rejection with value: object "InvalidStateError: AccessHandle is closed" | ||
FAIL SyncAccessHandle.flush fails after SyncAccessHandle.close promise_test: Unhandled rejection with value: object "InvalidStateError: AccessHandle is closed" | ||
FAIL SyncAccessHandle.getSize fails after SyncAccessHandle.close promise_test: Unhandled rejection with value: object "InvalidStateError: AccessHandle is closed" | ||
FAIL SyncAccessHandle.truncate fails after SyncAccessHandle.handle.close promise_test: Unhandled rejection with value: object "InvalidStateError: AccessHandle is closed" | ||
|
2 changes: 1 addition & 1 deletion
2
...eb-platform-tests/fs/FileSystemSyncAccessHandle-flush.https.tentative.worker-expected.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
PASS Test flush on an empty file. | ||
FAIL SyncAccessHandle.read returns bytes written by SyncAccessHandle.write after SyncAccessHandle.flush promise_test: Unhandled rejection with value: object "InvalidStateError: Access handle has unfinished operation" | ||
PASS SyncAccessHandle.read returns bytes written by SyncAccessHandle.write after SyncAccessHandle.flush | ||
|
2 changes: 1 addition & 1 deletion
2
...-platform-tests/fs/FileSystemSyncAccessHandle-getSize.https.tentative.worker-expected.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
|
||
FAIL test SyncAccessHandle.getSize after SyncAccessHandle.write assert_equals: expected (number) 0 but got (object) object "[object Promise]" | ||
PASS test SyncAccessHandle.getSize after SyncAccessHandle.write | ||
|
4 changes: 2 additions & 2 deletions
4
...platform-tests/fs/FileSystemSyncAccessHandle-truncate.https.tentative.worker-expected.txt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
|
||
FAIL test SyncAccessHandle.truncate with different sizes assert_equals: expected (number) 4 but got (object) object "[object Promise]" | ||
FAIL test SyncAccessHandle.truncate after SyncAccessHandle.write promise_test: Unhandled rejection with value: object "InvalidStateError: The object is in an invalid state." | ||
PASS test SyncAccessHandle.truncate with different sizes | ||
PASS test SyncAccessHandle.truncate after SyncAccessHandle.write | ||
|
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
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
Oops, something went wrong.