[webkit-changes] [WebKit/WebKit] 576330: RELEASE_ASSERT that ObjectIdentifier is valid when...

Chris Dumez noreply at github.com
Thu Aug 22 21:00:29 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 576330780972fa3d00dff2ae5f1fcb4c0575a466
      https://github.com/WebKit/WebKit/commit/576330780972fa3d00dff2ae5f1fcb4c0575a466
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2024-08-22 (Thu, 22 Aug 2024)

  Changed paths:
    M Source/WTF/wtf/ObjectIdentifier.h

  Log Message:
  -----------
  RELEASE_ASSERT that ObjectIdentifier is valid when constructed from a raw value
https://bugs.webkit.org/show_bug.cgi?id=278522

Reviewed by Darin Adler.

We recently made it so that ObjectIdentifier no longer has a default constructor
or an "invalid" state. However, a call site could still in theory construct an
ObjectIdentifier with a raw value of 0 to construct an invalid identifier. Doing
so would only hit an assertion in debug builds. For hardening, I'm suggesting we
turn this debug assertion into a release one. This tested as performance neutral.

* Source/WTF/wtf/ObjectIdentifier.h:
(WTF::ObjectIdentifierGeneric::generate):
(WTF::ObjectIdentifierGeneric::ObjectIdentifierGeneric):

Canonical link: https://commits.webkit.org/282646@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