Bug 237537

Summary: File System Access: throw exception if file or directory cannot be accessed in file system
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: Website StorageAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, sihui_liu, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing none

Description Sihui Liu 2022-03-07 09:25:24 PST
...
Comment 1 Sihui Liu 2022-03-07 15:09:03 PST
Created attachment 454041 [details]
Patch
Comment 2 youenn fablet 2022-03-08 01:03:07 PST
Comment on attachment 454041 [details]
Patch

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

> Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp:60
> +        return nullptr;

Should we add release logging if we are not able to create the file handle?
Comment 3 Chris Dumez 2022-03-08 07:22:33 PST
Comment on attachment 454041 [details]
Patch

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

I assume this is not testable?

> Source/WebKit/ChangeLog:8
> +        When a FileSystemHandle is created, we will ensure that correspoding directory or file exists (create the 

Typo: correspoding
Comment 4 Sihui Liu 2022-03-08 11:27:12 PST
Comment on attachment 454041 [details]
Patch

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

>> Source/WebKit/NetworkProcess/storage/FileSystemStorageHandle.cpp:60
>> +        return nullptr;
> 
> Should we add release logging if we are not able to create the file handle?

The boolean result does not contain error information (and from the error type we can probably infer the errored place), so I would prefer adding error log when we need to debug an error we spot in production builds.
Comment 5 Sihui Liu 2022-03-08 11:28:21 PST
(In reply to Chris Dumez from comment #3)
> Comment on attachment 454041 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=454041&action=review
> 
> I assume this is not testable?
> 
> > Source/WebKit/ChangeLog:8
> > +        When a FileSystemHandle is created, we will ensure that correspoding directory or file exists (create the 
> 
> Typo: correspoding

ah will change
Comment 6 Sihui Liu 2022-03-08 11:28:37 PST
Created attachment 454135 [details]
Patch for landing
Comment 7 Sihui Liu 2022-03-08 11:29:00 PST
Created attachment 454136 [details]
Patch for landing
Comment 8 EWS 2022-03-08 15:06:01 PST
Committed r291014 (248189@main): <https://commits.webkit.org/248189@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 454136 [details].
Comment 9 Radar WebKit Bug Importer 2022-03-08 15:07:18 PST
<rdar://problem/89992180>