Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: aa5bef0fe16f0e5812c7d675570bcb8bd223aa14
      
https://github.com/WebKit/WebKit/commit/aa5bef0fe16f0e5812c7d675570bcb8bd223aa14
  Author: Žan Doberšek <[email protected]>
  Date:   2022-10-24 (Mon, 24 Oct 2022)

  Changed paths:
    M Source/WebKit/Platform/IPC/ArgumentCoders.h
    M Source/WebKit/Platform/IPC/DaemonDecoder.h

  Log Message:
  -----------
  [WK2] ArgumentCoder<std::tuple<...>> should decode elements directly into 
std::optional<> values
https://bugs.webkit.org/show_bug.cgi?id=246510

Reviewed by Kimmo Kinnunen.

Requested during review of PR #5083, there shouldn't be a need to construct a 
valueless
std::optional<> before having the std::tuple<> decoder decode a given tuple 
element into it.
The decoder should be returning the std::optional<> instead.

For this to work with every decoder, Daemon::Decoder has to provide this 
decode<T>() method.
Similar to IPC::Decoder, this method can the be used in the
Daemon::Decoder::operator>>(std::optional<T>&) implementation.

* Source/WebKit/Platform/IPC/ArgumentCoders.h:
* Source/WebKit/Platform/IPC/DaemonDecoder.h:
(WebKit::Daemon::Decoder::operator>>):
(WebKit::Daemon::Decoder::decode):

Canonical link: https://commits.webkit.org/255914@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to