Bug 167136

Summary: Persist derived data
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson, buildbot, cdumez, cgarcia, commit-queue, dbates, japhet, rniwa
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
buildbot: commit-queue-
Archive of layout-test-results from ews101 for mac-elcapitan
none
patch none

Description Antti Koivisto 2017-01-17 13:30:22 PST
It would be useful to have a mechanism for persisting arbitrary derived data in the disk cache.
Comment 1 Antti Koivisto 2017-01-17 14:22:55 PST
Created attachment 299060 [details]
patch
Comment 2 WebKit Commit Bot 2017-01-17 14:23:56 PST
Attachment 299060 [details] did not pass style-queue:


ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.h:124:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:618:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp:575:  'loader' is incorrectly named. It should be named 'protectedThis'.  [readability/naming/protected] [4]
Total errors found: 3 in 35 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Build Bot 2017-01-17 15:30:04 PST
Comment on attachment 299060 [details]
patch

Attachment 299060 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/2905920

New failing tests:
imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location-protocol-setter-non-broken.html
Comment 4 Build Bot 2017-01-17 15:30:09 PST
Created attachment 299075 [details]
Archive of layout-test-results from ews101 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 5 Michael Catanzaro 2017-01-17 15:56:04 PST
Comment on attachment 299060 [details]
patch

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

> Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp:576
> +            NetworkCache::DataKey key { originalRequest().cachePartition(), type, *entry->sourceStorageRecord().bodyHash };

Can't use cachePartition here because it doesn't exist when ENABLE(CACHE_PARTITIONING) is false, as on GTK and EFL. (Why is it off on these ports?)
Comment 6 Andreas Kling 2017-01-17 16:10:49 PST
Comment on attachment 299060 [details]
patch

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

> Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp:575
> +            RefPtr<NetworkResourceLoader> loader(this);

You could capture this with makeRef(*this) instead.

> Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:354
> -    m_storage->retrieve(storageKey, priority, [this, request, completionHandler = WTFMove(completionHandler), startTime, storageKey, frameID](std::unique_ptr<Storage::Record> record) {
> +    m_storage->retrieve(storageKey, priority, [this, request, completionHandler = WTFMove(completionHandler), startTime, storageKey, frameID](auto record) {

This seems a little unrelated, but sure.

> Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:634
> +{

This function should return if the cache is not enabled.
Comment 7 Antti Koivisto 2017-01-17 16:14:13 PST
Created attachment 299078 [details]
patch
Comment 8 WebKit Commit Bot 2017-01-17 16:16:04 PST
Attachment 299078 [details] did not pass style-queue:


ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.h:124:  Extra space before ( in function call  [whitespace/parens] [4]
ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:618:  Extra space before ( in function call  [whitespace/parens] [4]
Total errors found: 2 in 35 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 9 WebKit Commit Bot 2017-01-17 17:15:44 PST
Comment on attachment 299078 [details]
patch

Clearing flags on attachment: 299078

Committed r210835: <http://trac.webkit.org/changeset/210835>
Comment 10 WebKit Commit Bot 2017-01-17 17:15:50 PST
All reviewed patches have been landed.  Closing bug.