Bug 232127

Summary: Followup to r284652: ensure file handle is closed in web process
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: New BugsAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: sihui_liu, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 231706    
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

Description Sihui Liu 2021-10-21 19:08:50 PDT
...
Comment 1 Sihui Liu 2021-10-21 23:30:05 PDT
Created attachment 442126 [details]
Patch
Comment 2 Sihui Liu 2021-10-21 23:47:28 PDT
Created attachment 442129 [details]
Patch
Comment 3 youenn fablet 2021-10-22 00:45:28 PDT
Comment on attachment 442129 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442129&action=review

> Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp:65
> +    FileSystem::closeFile(m_file);

We are calling closeFile in WebProcess and NetworkProcess. Are both actually needed?
I would hope we can move to a place where network process is only responsible for opening the file handle, sending it to web process, locking/unlocking the sync handle and doing quota checks.
WebProcess would be fully responsible to do everything else: getSize, flush, read, write, close, truncate...

> LayoutTests/storage/filesystemaccess/sync-access-handle-close-worker-expected.txt:537
> +[Worker] Create and close access handle No.511 successfully

Not sure we need that big of an expected file. Can we reduce its size?
Comment 4 Sihui Liu 2021-10-22 09:21:51 PDT
Created attachment 442169 [details]
Patch for landing
Comment 5 EWS 2021-10-22 09:52:33 PDT
Committed r284692 (243411@main): <https://commits.webkit.org/243411@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 442169 [details].
Comment 6 Radar WebKit Bug Importer 2021-10-22 09:53:18 PDT
<rdar://problem/84553142>