Summary: | Each web process truncates the disk cache to zero on launch | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Geoffrey Garen <ggaren> | ||||
Component: | New Bugs | Assignee: | Geoffrey Garen <ggaren> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | darin | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Geoffrey Garen
2013-03-05 12:40:45 PST
Created attachment 191537 [details]
Patch
Comment on attachment 191537 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=191537&action=review > Source/WebKit2/WebProcess/mac/WebProcessMac.mm:165 > + NSUInteger cacheMemoryCapacity = parameters.nsURLCacheMemoryCapacity; > + NSUInteger cacheDiskCapacity = parameters.nsURLCacheDiskCapacity; Strange to put two arguments into local variables here, but not the third. All three or none? > Source/WebKit2/WebProcess/mac/WebProcessMac.mm:168 > + RetainPtr<NSURLCache> parentProcessURLCache(AdoptNS, [[NSURLCache alloc] initWithMemoryCapacity:cacheMemoryCapacity diskCapacity:cacheDiskCapacity diskPath:parameters.diskCacheDirectory]); > + [NSURLCache setSharedURLCache:parentProcessURLCache.get()]; Wrong indentation here. Committed r144860: <http://trac.webkit.org/changeset/144860> More style comments for Geoff: 1) The adoptNS function is so much better than RetainPtr<xxx> yyy(AdoptNS, zzz). 2) No local variable needed. So next time I have a chance I’d just change this to: [NSURLCache setSharedURLCache:adoptNS([[NSURLCache alloc] initWithMemoryCapacity:parameters.nsURLCacheMemoryCapacity diskCapacity:parameters.nsURLCacheDiskCapacity diskPath:parameters.diskCacheDirectory]).get()]; Just wanted to get you into the adoptNS/adoptCF/adoptRef club! Committed r144958: <http://trac.webkit.org/changeset/144958> |