[webkit-reviews] review denied: [Bug 122960] MainThreadTask class variants should use std::unique_ptr : [Attachment 214451] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 17 07:03:14 PDT 2013


Anders Carlsson <andersca at apple.com> has denied Zan Dobersek
<zandobersek at gmail.com>'s request for review:
Bug 122960: MainThreadTask class variants should use std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=122960

Attachment 214451: Patch
https://bugs.webkit.org/attachment.cgi?id=214451&action=review

------- Additional Comments from Anders Carlsson <andersca at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=214451&action=review


Instead of using std::unique_ptr<MainThreadTask>(new MainThreadTask(...) you
can just use std::make_unique<MainThreadTask>(...).

> Source/WebCore/platform/MainThreadTask.h:487
> -    typename CrossThreadCopier<P4>::Type, MP4, typename
CrossThreadCopier<P5>::Type, MP5, typename CrossThreadCopier<P6>::Type, MP6,
> -    typename CrossThreadCopier<P7>::Type, MP7, typename
CrossThreadCopier<P8>::Type, MP8>::create(
> -							  method,
> -							 
CrossThreadCopier<P1>::copy(parameter1),
CrossThreadCopier<P2>::copy(parameter2),
> -							 
CrossThreadCopier<P3>::copy(parameter3),
CrossThreadCopier<P4>::copy(parameter4),
> -							 
CrossThreadCopier<P5>::copy(parameter5),
CrossThreadCopier<P6>::copy(parameter6),
> -							 
CrossThreadCopier<P7>::copy(parameter7),
CrossThreadCopier<P8>::copy(parameter8)).leakPtr());
> +	   typename CrossThreadCopier<P4>::Type, MP4, typename
CrossThreadCopier<P5>::Type, MP5, typename CrossThreadCopier<P6>::Type, MP6,
> +	   typename CrossThreadCopier<P7>::Type, MP7, typename
CrossThreadCopier<P8>::Type, MP8>::create(
> +	       method,
> +	       CrossThreadCopier<P1>::copy(parameter1),
CrossThreadCopier<P2>::copy(parameter2),
> +	       CrossThreadCopier<P3>::copy(parameter3),
CrossThreadCopier<P4>::copy(parameter4),
> +	       CrossThreadCopier<P5>::copy(parameter5),
CrossThreadCopier<P6>::copy(parameter6),
> +	       CrossThreadCopier<P7>::copy(parameter7),
CrossThreadCopier<P8>::copy(parameter8)).release());

I don't think there's any point in re-indenting this.


More information about the webkit-reviews mailing list