Bug 202590

Summary: DOMCache should not prevent pages from entering the back/forward cache
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Page LoadingAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, achristensen, ap, beidson, commit-queue, ggaren, webkit-bot-watchers-bugzilla, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=202850
Bug Depends on:    
Bug Blocks: 202293, 202608    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Chris Dumez 2019-10-04 10:51:29 PDT
DOMCache should not prevent pages from entering the back/forward cache.
Comment 1 Chris Dumez 2019-10-04 12:33:41 PDT
Created attachment 380233 [details]
Patch
Comment 2 Chris Dumez 2019-10-04 12:38:32 PDT
Created attachment 380235 [details]
Patch
Comment 3 Geoffrey Garen 2019-10-04 13:41:57 PDT
Comment on attachment 380235 [details]
Patch

EWS seems to be crashing in DOMCache tests.
Comment 4 Chris Dumez 2019-10-04 14:08:23 PDT
Created attachment 380251 [details]
Patch
Comment 5 Radar WebKit Bug Importer 2019-10-07 08:14:13 PDT
<rdar://problem/56036489>
Comment 6 Chris Dumez 2019-10-07 08:23:02 PDT
Comment on attachment 380251 [details]
Patch

Will investigate WK1 failures.
Comment 7 Chris Dumez 2019-10-07 08:25:17 PDT
(In reply to Chris Dumez from comment #6)
> Comment on attachment 380251 [details]
> Patch
> 
> Will investigate WK1 failures.

Oh, it looks like DOMCache is WK2 only. Will skip the new test on WK1.
Comment 8 Chris Dumez 2019-10-07 08:29:07 PDT
Created attachment 380329 [details]
Patch
Comment 9 youenn fablet 2019-10-07 11:03:15 PDT
Comment on attachment 380329 [details]
Patch

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

> Source/WebCore/Modules/cache/DOMCache.cpp:450
> +    queryCache(request.releaseNonNull(), WTFMove(options), [this, protectedThis = makeRef(*this), promise = WTFMove(promise)](ExceptionOr<Vector<CacheStorageRecord>>&& result) mutable {

auto&& here and above as well if we want.

> Source/WebCore/Modules/cache/DOMCache.h:61
> +    using MatchCallback = WTF::Function<void(ExceptionOr<RefPtr<FetchResponse>>)>;

s/WTF:://

> Source/WebCore/Modules/cache/DOMCacheStorage.cpp:63
> +    cache.doMatch(WTFMove(info), WTFMove(options), [caches = WTFMove(caches), info, options, completionHandler = WTFMove(completionHandler), index](ExceptionOr<RefPtr<FetchResponse>>&& result) mutable {

auto&&

> Source/WebCore/Modules/cache/DOMCacheStorage.cpp:88
> +    startSequentialMatch(WTF::map(m_caches, copyCache), WTFMove(info), WTFMove(options), [this, pendingActivity = makePendingActivity(*this), promise = WTFMove(promise)](ExceptionOr<RefPtr<FetchResponse>>&& result) mutable {

auto&&
Comment 10 Chris Dumez 2019-10-07 13:11:41 PDT
Created attachment 380348 [details]
Patch
Comment 11 Chris Dumez 2019-10-07 13:41:11 PDT
Comment on attachment 380348 [details]
Patch

Clearing flags on attachment: 380348

Committed r250786: <https://trac.webkit.org/changeset/250786>
Comment 12 Chris Dumez 2019-10-07 13:41:13 PDT
All reviewed patches have been landed.  Closing bug.
Comment 13 Aakash Jain 2019-10-11 15:10:42 PDT
> Committed r250786: <https://trac.webkit.org/changeset/250786>
This commit seems to have broken API Test: WebKit.DefaultQuota (Bug 202850). EWS also indicated that failure.
Comment 14 Chris Dumez 2019-10-11 15:32:46 PDT
(In reply to Aakash Jain from comment #13)
> > Committed r250786: <https://trac.webkit.org/changeset/250786>
> This commit seems to have broken API Test: WebKit.DefaultQuota (Bug 202850).
> EWS also indicated that failure.

Odd, I am investigating.