Bug 207959 - Regression(r247567) HTTP Disk cache capacity is no longer set
Summary: Regression(r247567) HTTP Disk cache capacity is no longer set
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 207967
  Show dependency treegraph
 
Reported: 2020-02-19 13:41 PST by Chris Dumez
Modified: 2020-02-19 15:34 PST (History)
8 users (show)

See Also:


Attachments
Patch (14.61 KB, patch)
2020-02-19 13:58 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (14.66 KB, patch)
2020-02-19 14:50 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2020-02-19 13:41:20 PST
HTTP Disk cache capacity is no longer set since r247567 so we end up with a default capacity for std::numeric_limit<size_t>::max().
Comment 1 Radar WebKit Bug Importer 2020-02-19 13:41:50 PST
<rdar://problem/59603972>
Comment 2 Chris Dumez 2020-02-19 13:58:49 PST
Created attachment 391197 [details]
Patch
Comment 3 Antti Koivisto 2020-02-19 14:12:27 PST
Comment on attachment 391197 [details]
Patch

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

> Source/WebKit/NetworkProcess/cache/NetworkCache.cpp:76
> +        calculateURLCacheSizes(cacheModel, diskFreeSize, urlCacheMemoryCapacity, urlCacheDiskCapacity);
> +    }
> +    return urlCacheDiskCapacity;

This stuff could use a cleanups at some point. We have no "URL cache" and urlCacheMemoryCapacity is never used.
Comment 4 Alex Christensen 2020-02-19 14:13:09 PST
Comment on attachment 391197 [details]
Patch

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

> Source/WebKit/NetworkProcess/NetworkProcess.cpp:2047
> +    if (m_hasSetCacheModel && cacheModel == m_cacheModel)

m_cacheModel should be an Optional instead of a bool m_hasSetCacheModel
Comment 5 Chris Dumez 2020-02-19 14:49:46 PST
Comment on attachment 391197 [details]
Patch

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

>> Source/WebKit/NetworkProcess/NetworkProcess.cpp:2047
>> +    if (m_hasSetCacheModel && cacheModel == m_cacheModel)
> 
> m_cacheModel should be an Optional instead of a bool m_hasSetCacheModel

I agree but since the patch will likely get cherry-picked, I think it is good to keep the change minimal. I will drop changes to this line. Not sure why I dropped the parentheses.
Comment 6 Chris Dumez 2020-02-19 14:50:36 PST
Created attachment 391204 [details]
Patch
Comment 7 WebKit Commit Bot 2020-02-19 15:34:01 PST
Comment on attachment 391204 [details]
Patch

Clearing flags on attachment: 391204

Committed r256967: <https://trac.webkit.org/changeset/256967>
Comment 8 WebKit Commit Bot 2020-02-19 15:34:03 PST
All reviewed patches have been landed.  Closing bug.