Bug 121453

Summary: Replace more uses of PassOwnPtr with OwnPtr in WebKit2
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch sam: review+

Anders Carlsson
Reported 2013-09-16 14:31:34 PDT
Replace more uses of PassOwnPtr with OwnPtr in WebKit2
Attachments
Patch (17.84 KB, patch)
2013-09-16 14:32 PDT, Anders Carlsson
sam: review+
Anders Carlsson
Comment 1 2013-09-16 14:32:50 PDT
Darin Adler
Comment 2 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?
Anders Carlsson
Comment 3 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.
Anders Carlsson
Comment 4 2013-09-16 15:10:55 PDT
Note You need to log in before you can comment on or make changes to this bug.