RESOLVED FIXED 232363
Release FileSystemStorageHandle when it is not in use
https://bugs.webkit.org/show_bug.cgi?id=232363
Summary Release FileSystemStorageHandle when it is not in use
Sihui Liu
Reported 2021-10-26 20:10:10 PDT
...
Attachments
Patch (32.13 KB, patch)
2021-10-26 20:16 PDT, Sihui Liu
no flags
Patch (32.13 KB, patch)
2021-10-26 22:58 PDT, Sihui Liu
no flags
Patch (32.12 KB, patch)
2021-10-27 09:23 PDT, Sihui Liu
no flags
Patch for landing (33.76 KB, patch)
2021-10-28 15:46 PDT, Sihui Liu
no flags
Patch for landing (33.71 KB, patch)
2021-10-29 10:16 PDT, Sihui Liu
no flags
Sihui Liu
Comment 1 2021-10-26 20:16:38 PDT
Sihui Liu
Comment 2 2021-10-26 22:58:36 PDT
Sihui Liu
Comment 3 2021-10-27 09:23:55 PDT
youenn fablet
Comment 4 2021-10-28 09:58:19 PDT
Comment on attachment 442596 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=442596&action=review > Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp:69 > + FileSystem::closeFile(file); If we need to do it there, we might have an issue as this task might be scheduled but never executed. Maybe we should have a result that, if destroyed and its file is valid, would call closeFile whatever. > Source/WebCore/Modules/filesystemaccess/WorkerFileSystemStorageConnection.cpp:81 > + return; If we do not have a scope, shouldn't we still call closeHandle? > Source/WebCore/Modules/storage/StorageManager.cpp:125 > + connection->closeHandle(identifier); Ditto here, should we call closeHandle if the task is not executed?
Sihui Liu
Comment 5 2021-10-28 15:46:21 PDT
Created attachment 442757 [details] Patch for landing
EWS
Comment 6 2021-10-28 16:46:29 PDT
Committed r285007 (243653@main): <https://commits.webkit.org/243653@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442757 [details].
Radar WebKit Bug Importer
Comment 7 2021-10-28 16:47:16 PDT
ayumi_kojima
Comment 8 2021-10-29 08:47:36 PDT
Reverted r285007 for reason: Reverting r285007 because it caused storage/filesystemaccess/sync-access-handle-basics-worker.html to constantly fail. Committed r285030 (243674@main): <https://commits.webkit.org/243674@main>
Sihui Liu
Comment 9 2021-10-29 10:16:36 PDT
Created attachment 442834 [details] Patch for landing
Sihui Liu
Comment 10 2021-10-29 10:23:48 PDT
Comment on attachment 442834 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=442834&action=review Re-landing patch after making a small change to the test file. > LayoutTests/storage/filesystemaccess/resources/sync-access-handle-basics.js:23 > + }, () => { > + createFileHandle(rootHandle); This old patch exits early here. The removeEntry() means to clean up existing test file if it exists. If the file does not exist, removeEntry may throw error, and it's fine to continue test.
EWS
Comment 11 2021-10-29 10:53:26 PDT
Committed r285041 (243685@main): <https://commits.webkit.org/243685@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442834 [details].
Note You need to log in before you can comment on or make changes to this bug.