Bug 142143 - Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ScrollAnimator
Summary: Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ScrollAnimator
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-01 05:03 PST by Joonghun Park
Modified: 2015-03-01 17:49 PST (History)
3 users (show)

See Also:


Attachments
Patch (5.33 KB, patch)
2015-03-01 05:10 PST, Joonghun Park
no flags Details | Formatted Diff | Diff
Patch (5.66 KB, patch)
2015-03-01 05:42 PST, Joonghun Park
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joonghun Park 2015-03-01 05:03:47 PST
Change from PassOwnPtr|OwnPtr to std::unique_ptr for ScrollAnimator in All port.
Comment 1 Joonghun Park 2015-03-01 05:10:05 PST
Created attachment 247624 [details]
Patch
Comment 2 Joonghun Park 2015-03-01 05:42:41 PST
Created attachment 247625 [details]
Patch
Comment 3 Darin Adler 2015-03-01 11:04:02 PST
Comment on attachment 247625 [details]
Patch

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

> Source/WebCore/platform/ScrollAnimator.h:62
> +    explicit ScrollAnimator(ScrollableArea&);

It’s not so great that now a client can now accidentally create a ScrollAnimator directly with make_unique, when it should be calling ScrollAnimator::create.
Comment 4 Gyuyoung Kim 2015-03-01 17:04:40 PST
Comment on attachment 247625 [details]
Patch

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

cq=me.

>> Source/WebCore/platform/ScrollAnimator.h:62
>> +    explicit ScrollAnimator(ScrollableArea&);
> 
> It’s not so great that now a client can now accidentally create a ScrollAnimator directly with make_unique, when it should be calling ScrollAnimator::create.

I also think like that. However, now we don't have best solution yet. In this case, lambdas looks not great benefit. When we have better solution, let's fix it again.
Comment 5 WebKit Commit Bot 2015-03-01 17:49:16 PST
Comment on attachment 247625 [details]
Patch

Clearing flags on attachment: 247625

Committed r180873: <http://trac.webkit.org/changeset/180873>
Comment 6 WebKit Commit Bot 2015-03-01 17:49:19 PST
All reviewed patches have been landed.  Closing bug.