[webkit-changes] [WebKit/WebKit] 22987c: [WK2] Further simplify ArgumentCoder decoding for ...

Žan Doberšek noreply at github.com
Wed Nov 2 07:51:43 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 22987c3dcd7be882ad32ee1a0920e35137a6eadc
      https://github.com/WebKit/WebKit/commit/22987c3dcd7be882ad32ee1a0920e35137a6eadc
  Author: Žan Doberšek <zan at falconsigh.net>
  Date:   2022-11-02 (Wed, 02 Nov 2022)

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

  Log Message:
  -----------
  [WK2] Further simplify ArgumentCoder decoding for std::tuple<>, std::array<>
https://bugs.webkit.org/show_bug.cgi?id=247227

Reviewed by Kimmo Kinnunen.

Have the std::tuple<> decoding in ArgumentCoders.h avoid constructing tuples of
forwarding references by instead passing the rvalue references to the decoded
elements through a parameter pack. Recursion is still used, and the rvalue
references are passed on until the size of the parameter pack matches the size
of the tuple, at which point said tuple is constructed and returned as the result
of the decoding.

Identical approach is adopted for the std::array<> decoder.

The change incorporates a MSCV++ workaround for a compiler bug which breaks
builds due to the constexpr if-statement checking the current index against the
number of the already-decoded elements. Workaround moves the result of this check
into a separate constexpr boolean. Tracking is set up in bug #247226.

* Source/WebKit/Platform/IPC/ArgumentCoders.h:

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




More information about the webkit-changes mailing list