Bug 153705 - Use std::make_unique<> when creating an unique_ptr object
Summary: Use std::make_unique<> when creating an unique_ptr object
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gyuyoung Kim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-30 05:01 PST by Gyuyoung Kim
Modified: 2016-01-31 03:41 PST (History)
1 user (show)

See Also:


Attachments
Patch (14.20 KB, patch)
2016-01-30 05:05 PST, Gyuyoung Kim
no flags Details | Formatted Diff | Diff
Patch for landing (14.00 KB, patch)
2016-01-30 20:34 PST, Gyuyoung Kim
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyuyoung Kim 2016-01-30 05:01:45 PST
Some factory functions have used std::unique_ptr<> instead of std::make_unique<>. In those cases we need to use std::make_unique<> directly.
Comment 1 Gyuyoung Kim 2016-01-30 05:05:41 PST
Created attachment 270305 [details]
Patch
Comment 2 Darin Adler 2016-01-30 11:25:26 PST
Comment on attachment 270305 [details]
Patch

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

> Source/WebCore/platform/cf/RunLoopObserver.h:41
> +    // WEBCORE_EXPORT static std::unique_ptr<RunLoopObserver> create(CFIndex order, RunLoopObserverCallback callback);

We should not keep this commented out code.
Comment 3 Gyuyoung Kim 2016-01-30 20:34:31 PST
Created attachment 270336 [details]
Patch for landing
Comment 4 Gyuyoung Kim 2016-01-30 20:35:13 PST
(In reply to comment #2)
> Comment on attachment 270305 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=270305&action=review
> 
> > Source/WebCore/platform/cf/RunLoopObserver.h:41
> > +    // WEBCORE_EXPORT static std::unique_ptr<RunLoopObserver> create(CFIndex order, RunLoopObserverCallback callback);
> 
> We should not keep this commented out code.

Oops. Removed.
Comment 5 WebKit Commit Bot 2016-01-31 03:41:52 PST
Comment on attachment 270336 [details]
Patch for landing

Clearing flags on attachment: 270336

Committed r195925: <http://trac.webkit.org/changeset/195925>
Comment 6 WebKit Commit Bot 2016-01-31 03:41:56 PST
All reviewed patches have been landed.  Closing bug.