Bug 167136 - Persist derived data
Summary: Persist derived data
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-17 13:30 PST by Antti Koivisto
Modified: 2017-01-17 17:15 PST (History)
8 users (show)

See Also:


Attachments
patch (37.08 KB, patch)
2017-01-17 14:22 PST, Antti Koivisto
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-elcapitan (736.31 KB, application/zip)
2017-01-17 15:30 PST, Build Bot
no flags Details
patch (37.26 KB, patch)
2017-01-17 16:14 PST, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.