Make Caches::writeRecord and Caches::readRecord more robust
Created attachment 419748 [details] Patch
Crash record at https://ews-build.s3-us-west-2.amazonaws.com/macOS-Catalina-Release-WK2-Tests-EWS/r419742-829/imported/w3c/web-platform-tests/service-workers/service-worker/fetch-event-within-sw.https-crash-log.txt
<rdar://problem/74400704>
Comment on attachment 419748 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419748&action=review > Source/WebKit/ChangeLog:9 > + Some events happen during teardown. No reason to crash. This seems ok to add a null check. The underlying issue is probably that: - we request space, which is an asynchronous operation as we may prompt user - somehow we are requested to clear the caches - user grants request space and we are back with no available storage. I think this can be fixed by bailing out early in Caches::requestSpace callback in case m_isInitialized is false.
r279597
Reverted in r279599
Reopening to attach new patch.
Created attachment 432953 [details] Patch
Committed r279607 (239430@main): <https://commits.webkit.org/239430@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 432953 [details].