Bug 222937 - Simplify CallbackAggregator in WebsiteDataStore::fetchDataAndApply()
Summary: Simplify CallbackAggregator in WebsiteDataStore::fetchDataAndApply()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-08 13:08 PST by Chris Dumez
Modified: 2021-03-08 19:41 PST (History)
6 users (show)

See Also:


Attachments
Patch (16.08 KB, patch)
2021-03-08 13:11 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (18.48 KB, patch)
2021-03-08 17:50 PST, Chris Dumez
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (19.26 KB, patch)
2021-03-08 18:13 PST, 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 2021-03-08 13:08:30 PST
Simplify CallbackAggregator in WebsiteDataStore::fetchDataAndApply().
Comment 1 Chris Dumez 2021-03-08 13:11:46 PST
Created attachment 422609 [details]
Patch
Comment 2 Darin Adler 2021-03-08 17:32:16 PST
Comment on attachment 422609 [details]
Patch

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

> Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:432
> +private:

Should indent this 4?

> Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:441
> +    auto callbackAggregator = adoptRef(new CallbackAggregator(fetchOptions, WTFMove(queue), WTFMove(apply), *this));

Seems like there is a missing * here so we get a Ref<> instead of a RefPtr<>.
Comment 3 Chris Dumez 2021-03-08 17:44:55 PST
(In reply to Darin Adler from comment #2)
> Comment on attachment 422609 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=422609&action=review
> 
> > Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:432
> > +private:
> 
> Should indent this 4?
> 
> > Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:441
> > +    auto callbackAggregator = adoptRef(new CallbackAggregator(fetchOptions, WTFMove(queue), WTFMove(apply), *this));
> 
> Seems like there is a missing * here so we get a Ref<> instead of a RefPtr<>.

Oh right. We used to not do that to make capture by value convenient in the lambdas. However, Ref<> has a copy-constructor nowadays!
Comment 4 Chris Dumez 2021-03-08 17:50:01 PST
Created attachment 422646 [details]
Patch
Comment 5 Chris Dumez 2021-03-08 18:13:14 PST
Created attachment 422649 [details]
Patch
Comment 6 EWS 2021-03-08 19:40:42 PST
Committed r274130: <https://commits.webkit.org/r274130>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 422649 [details].
Comment 7 Radar WebKit Bug Importer 2021-03-08 19:41:20 PST
<rdar://problem/75199890>