Bug 121453 - Replace more uses of PassOwnPtr with OwnPtr in WebKit2
Summary: Replace more uses of PassOwnPtr with OwnPtr in WebKit2
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: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-16 14:31 PDT by Anders Carlsson
Modified: 2013-09-16 15:10 PDT (History)
0 users

See Also:


Attachments
Patch (17.84 KB, patch)
2013-09-16 14:32 PDT, Anders Carlsson
sam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2013-09-16 14:31:34 PDT
Replace more uses of PassOwnPtr with OwnPtr in WebKit2
Comment 1 Anders Carlsson 2013-09-16 14:32:50 PDT
Created attachment 211833 [details]
Patch
Comment 2 Darin Adler 2013-09-16 14:52:38 PDT
Comment on attachment 211833 [details]
Patch

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

> Source/WebKit2/Platform/CoreIPC/Connection.cpp:100
>  WTF_MAKE_NONCOPYABLE(SecondaryThreadPendingSyncReply);

I think that having an OwnPtr will automatically make the class noncopyable, so you could just omit this now.

> Source/WebKit2/Platform/CoreIPC/Connection.cpp:102
> -    SecondaryThreadPendingSyncReply() : replyDecoder(0) { }
> +    SecondaryThreadPendingSyncReply() { }

Should just omit this entirely and let the compiler generate it.

> Source/WebKit2/Platform/CoreIPC/Connection.cpp:640
> +    const auto it = m_workQueueMessageReceivers.find(message->messageReceiverName());

Why const?

> Source/WebKit2/Platform/CoreIPC/Connection.cpp:656
> +        auto it = m_waitForMessageMap.find(std::make_pair(std::make_pair(message->messageReceiverName(), message->messageName()), message->destinationID()));

You didn’t add const here, so why did you add it above?
Comment 3 Anders Carlsson 2013-09-16 14:58:01 PDT
Comment on attachment 211833 [details]
Patch

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

>> Source/WebKit2/Platform/CoreIPC/Connection.cpp:102
>> +    SecondaryThreadPendingSyncReply() { }
> 
> Should just omit this entirely and let the compiler generate it.

I tried doing that but it wouldn’t work due to the WTF_MAKE_NONCOPYABLE. I’ve removed both now.

>> Source/WebKit2/Platform/CoreIPC/Connection.cpp:640
>> +    const auto it = m_workQueueMessageReceivers.find(message->messageReceiverName());
> 
> Why const?

No good reason, I’ll remove it.
Comment 4 Anders Carlsson 2013-09-16 15:10:55 PDT
Committed r155905: <http://trac.webkit.org/changeset/155905>