[webkit-changes] [WebKit/WebKit] 4543cc: Add static_assert to spanReinterpretCast<>() to pr...

Commit Queue noreply at github.com
Wed Oct 23 14:33:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4543cc7cb73c575744c415cdb70d9f7353e3181c
      https://github.com/WebKit/WebKit/commit/4543cc7cb73c575744c415cdb70d9f7353e3181c
  Author: David Kilzer <ddkilzer at apple.com>
  Date:   2024-10-23 (Wed, 23 Oct 2024)

  Changed paths:
    M Source/WTF/wtf/StdLibExtras.h
    M Source/WebKit/Platform/IPC/Decoder.h

  Log Message:
  -----------
  Add static_assert to spanReinterpretCast<>() to prevent unnecessary casts
<https://bugs.webkit.org/show_bug.cgi?id=281994>
<rdar://138491814>

Reviewed by Darin Adler.

* Source/WTF/wtf/StdLibExtras.h:
(WTF::spanReinterpretCast):
- Add static_assert() to catch unnecessary casts.
* Source/WebKit/Platform/IPC/Decoder.h:
(IPC::Decoder::decodeSpan):
- Eliminate unnecessary call to spanReinterpretCast<>() when decoding to
  uint8_t bytes.

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list