[webkit-changes] [WebKit/WebKit] aa5bef: [WK2] ArgumentCoder<std::tuple<...>> should decode...
Žan Doberšek
noreply at github.com
Mon Oct 24 06:55:38 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: aa5bef0fe16f0e5812c7d675570bcb8bd223aa14
https://github.com/WebKit/WebKit/commit/aa5bef0fe16f0e5812c7d675570bcb8bd223aa14
Author: Žan Doberšek <zan at falconsigh.net>
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
More information about the webkit-changes
mailing list