Bug 131916 - iOS and non-iOS RemoteCommandListener::create() functions should use std::make_unique<>()
Summary: iOS and non-iOS RemoteCommandListener::create() functions should use std::mak...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Zan Dobersek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-20 11:01 PDT by Zan Dobersek
Modified: 2014-04-21 03:49 PDT (History)
1 user (show)

See Also:


Attachments
Patch (2.99 KB, patch)
2014-04-20 11:07 PDT, Zan Dobersek
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2014-04-20 11:01:56 PDT
iOS and non-iOS RemoteCommandListener::create() functions should use std::make_unique<>()
Comment 1 Zan Dobersek 2014-04-20 11:07:11 PDT
Created attachment 229770 [details]
Patch
Comment 2 Darin Adler 2014-04-20 19:45:57 PDT
Comment on attachment 229770 [details]
Patch

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

I guess this is OK. It does seem slightly unsafe that the constructor is public given that it would be incorrect to use it on iOS, but still better than a “naked new”.

> Source/WebCore/platform/RemoteCommandListener.h:42
> +    RemoteCommandListener(RemoteCommandListenerClient& client) : m_client(client) { };

No semicolon needed.
Comment 3 Zan Dobersek 2014-04-21 03:49:41 PDT
Committed r167590: <http://trac.webkit.org/changeset/167590>