Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 635d7979f0f19934201bef508f277840286fccb0
      
https://github.com/WebKit/WebKit/commit/635d7979f0f19934201bef508f277840286fccb0
  Author: Chris Dumez <[email protected]>
  Date:   2026-03-27 (Fri, 27 Mar 2026)

  Changed paths:
    M Source/WTF/wtf/CheckedPtr.h
    M Tools/TestWebKitAPI/Tests/WTF/CheckedPtr.cpp

  Log Message:
  -----------
  Fix `isAnyOf()` for non-const `CheckedPtr&` to call `isAnyOf` instead of `is`
https://bugs.webkit.org/show_bug.cgi?id=310851

Reviewed by Ryosuke Niwa.

The non-const `isAnyOf(CheckedPtr<>&)` overload incorrectly delegated to
`is<ExpectedTypes...>()` instead of `isAnyOf<ExpectedTypes...>()`. Since
`is<>()` takes a *single* ExpectedType parameter, calling it with multiple
types either silently gave wrong results (2 types) or failed to compile
(3+ types). The const overload was already correct.

Test: Tools/TestWebKitAPI/Tests/WTF/CheckedPtr.cpp

* Source/WTF/wtf/CheckedPtr.h:
(WTF::isAnyOf):
* Tools/TestWebKitAPI/Tests/WTF/CheckedPtr.cpp:
(TestWebKitAPI::CheckedBaseForIsAnyOf::isDerivedCheckedA const):
(TestWebKitAPI::CheckedBaseForIsAnyOf::isDerivedCheckedB const):
(isType):
(TestWebKitAPI::TEST(WTF_CheckedPtr, IsAnyOfNonConst)):

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



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

Reply via email to