Make NetworkCache blobs safe for mmap instead of not using blobs
Created attachment 368203 [details] Patch
Created attachment 368213 [details] Patch
Comment on attachment 368213 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=368213&action=review Looks fine except the part where it doesn't build. > Source/WebKit/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:97 > + makeSafeToUseMemoryMapForPath(blobPathString); Can't you do this after the existence test? Or do you specifically want to upgrade existing files? > Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp:-281 > -static size_t estimateRecordsSize(unsigned recordCount, unsigned blobCount) > -{ > - auto inlineBodyCount = recordCount - std::min(blobCount, recordCount); > - auto headerSizes = recordCount * 4096; > - auto inlineBodySizes = (maximumInlineBodySize / 2) * inlineBodyCount; > - return headerSizes + inlineBodySizes; > -} You can't delete this function! > Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp:315 > ...because you call it here.
Comment on attachment 368213 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=368213&action=review >> Source/WebKit/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:97 >> + makeSafeToUseMemoryMapForPath(blobPathString); > > Can't you do this after the existence test? Or do you specifically want to upgrade existing files? I want to "upgrade" existing files. I don't think it matters if I do it before or after the call to access, but it needs to be before the call to mapFile.
Created attachment 368243 [details] Patch
Comment on attachment 368243 [details] Patch Clearing flags on attachment: 368243 Committed r244678: <https://trac.webkit.org/changeset/244678>
All reviewed patches have been landed. Closing bug.