[webkit-reviews] review granted: [Bug 222992] Use UniqueRef<> instead of std::unique_ptr<> when passing IPC::Encoder to sendMessage() : [Attachment 422774] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 9 16:55:55 PST 2021


Alex Christensen <achristensen at apple.com> has granted Chris Dumez
<cdumez at apple.com>'s request for review:
Bug 222992: Use UniqueRef<> instead of std::unique_ptr<> when passing
IPC::Encoder to sendMessage()
https://bugs.webkit.org/show_bug.cgi?id=222992

Attachment 422774: Patch

https://bugs.webkit.org/attachment.cgi?id=422774&action=review




--- Comment #4 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 422774
  --> https://bugs.webkit.org/attachment.cgi?id=422774
Patch

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

> Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:-637
> -	   replyEncoder.reset();

There are two of these.  Why don't you remove both of them?

> Source/WebKit/NetworkProcess/WebStorage/StorageManagerSet.h:75
> +    bool didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&,
UniqueRef<IPC::Encoder>& replyEncoder);

We should probably use UniqueRef<>&& and move the ownership.
It would be worth putting in the change log that we need to return a boolean
because we are not checking the null status of the unique_ptr any more.


More information about the webkit-reviews mailing list