Bug 222937

Summary: Simplify CallbackAggregator in WebsiteDataStore::fetchDataAndApply()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, darin, ggaren, kkinnunen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=222837
Attachments:
Description Flags
Patch
none
Patch
ews-feeder: commit-queue-
Patch none

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>