[webkit-reviews] review denied: [Bug 121868] Use std::unique_ptr for decoders as well : [Attachment 212503] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 24 14:32:50 PDT 2013


Andreas Kling <akling at apple.com> has denied Anders Carlsson
<andersca at apple.com>'s request for review:
Bug 121868: Use std::unique_ptr for decoders as well
https://bugs.webkit.org/show_bug.cgi?id=121868

Attachment 212503: Patch
https://bugs.webkit.org/attachment.cgi?id=212503&action=review

------- Additional Comments from Andreas Kling <akling at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=212503&action=review


> Source/WebKit2/Platform/CoreIPC/Connection.cpp:425
> -	   HashMap<std::pair<std::pair<StringReference, StringReference>,
uint64_t>, OwnPtr<MessageDecoder>>::iterator it =
m_waitForMessageMap.find(messageAndDestination);
> +	   auto it = m_waitForMessageMap.find(messageAndDestination);
>	   if (it->value) {
> -	       OwnPtr<MessageDecoder> decoder = it->value.release();
> +	       std::unique_ptr<MessageDecoder> decoder = std::move(it->value);
>	       m_waitForMessageMap.remove(it);
>  
> -	       return decoder.release();
> +	       return decoder;
>	   }
> +
> +	   if (std::unique_ptr<MessageDecoder> decoder =
m_waitForMessageMap.take(messageAndDestination))
> +	       return decoder;

Still has the bug. :|


More information about the webkit-reviews mailing list