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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 24 14:26:12 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 212501: Patch
https://bugs.webkit.org/attachment.cgi?id=212501&action=review

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


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

This is wrong, you are now always taking the decoder out of the map!


More information about the webkit-reviews mailing list