Summary: | Add custom copy() method for Ref<T> to CrossThreadCopier | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sihui Liu <sihui_liu> | ||||
Component: | New Bugs | Assignee: | Sihui Liu <sihui_liu> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, darin, ews-watchlist, webkit-bug-importer, youennf | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Sihui Liu
2021-12-16 17:24:56 PST
Created attachment 447417 [details]
Patch
Committed r287207 (245374@main): <https://commits.webkit.org/245374@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 447417 [details]. Comment on attachment 447417 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=447417&action=review > Source/WTF/wtf/CrossThreadCopier.h:58 > + typedef T Type; Reminds me that in newer code we’d love to use "using" rather than typedef. > Source/WTF/wtf/CrossThreadCopier.h:107 > + typedef Ref<T> Type; Like here too. > Source/WTF/wtf/CrossThreadCopier.h:111 > + static Type copy(const Type& ref) > + { > + return ref; > + } I probably would write these as one-liners. |