Summary: | Make NetworkCache blobs safe for mmap instead of not using blobs | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alex Christensen <achristensen> | ||||||||
Component: | New Bugs | Assignee: | Alex Christensen <achristensen> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | cdumez, cgarcia, commit-queue, ews-watchlist, koivisto | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Alex Christensen
2019-04-24 17:16:42 PDT
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. |