Bug 202590 - DOMCache should not prevent pages from entering the back/forward cache
Summary: DOMCache should not prevent pages from entering the back/forward cache
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: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 202293 202608
  Show dependency treegraph
 
Reported: 2019-10-04 10:51 PDT by Chris Dumez
Modified: 2019-10-11 15:32 PDT (History)
9 users (show)

See Also:


Attachments
Patch (15.28 KB, patch)
2019-10-04 12:33 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (15.41 KB, patch)
2019-10-04 12:38 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (18.26 KB, patch)
2019-10-04 14:08 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (20.44 KB, patch)
2019-10-07 08:29 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (20.38 KB, patch)
2019-10-07 13:11 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

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