Add initial support for speculative resource revalidation to the WebKit disk cache. The functionality will be disabled by default until it is more complete / mature.
rdar://problem/23092196
Created attachment 265188 [details] WIP Patch
Attachment 265188 [details] did not pass style-queue: ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:346: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:430: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.h:106: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.h:107: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 4 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 265209 [details] WIP Patch
Created attachment 265210 [details] WIP Patch
Attachment 265210 [details] did not pass style-queue: ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:346: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:428: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.h:105: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.h:106: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 4 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 265210 [details] WIP Patch View in context: https://bugs.webkit.org/attachment.cgi?id=265210&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:136 > +void SpeculativeLoad::cleanup() Maybe call this something else than "cleanup" since it actually invokes the completion handler.
Created attachment 265301 [details] Patch
Attachment 265301 [details] did not pass style-queue: ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:346: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp:427: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.h:105: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebKit2/NetworkProcess/cache/NetworkCache.h:106: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 4 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 265301 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=265301&action=review > Source/WebKit2/NetworkProcess/cache/NetworkCache.h:87 > +using GlobalFrameID = std::pair<uint64_t /*webPageID*/, uint64_t /*webFrameID*/>; It would be slightly nicer if this was a struct with named fields though I suppose that would make using it as hash key more complicated.
(In reply to comment #10) > Comment on attachment 265301 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=265301&action=review > > > Source/WebKit2/NetworkProcess/cache/NetworkCache.h:87 > > +using GlobalFrameID = std::pair<uint64_t /*webPageID*/, uint64_t /*webFrameID*/>; > > It would be slightly nicer if this was a struct with named fields though I > suppose that would make using it as hash key more complicated. How strongly do you feel about this? :) As you said, I would need to provide HashTraits if I did this. Also, the code should really not need to access actual pair values. The only code that does currently is the Cache Statistics code which is not production code.
(In reply to comment #11) > (In reply to comment #10) > > Comment on attachment 265301 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=265301&action=review > > > > > Source/WebKit2/NetworkProcess/cache/NetworkCache.h:87 > > > +using GlobalFrameID = std::pair<uint64_t /*webPageID*/, uint64_t /*webFrameID*/>; > > > > It would be slightly nicer if this was a struct with named fields though I > > suppose that would make using it as hash key more complicated. > > How strongly do you feel about this? :) As you said, I would need to provide > HashTraits if I did this. Also, the code should really not need to access > actual pair values. The only code that does currently is the Cache > Statistics code which is not production code. Not strongly at all.
Comment on attachment 265301 [details] Patch go go go
Comment on attachment 265301 [details] Patch Clearing flags on attachment: 265301 Committed r192328: <http://trac.webkit.org/changeset/192328>
All reviewed patches have been landed. Closing bug.