WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
291276
REGRESSION (
290899@main
): Fix WTF::RetainPtrType when using `id` type
https://bugs.webkit.org/show_bug.cgi?id=291276
Summary
REGRESSION (290899@main): Fix WTF::RetainPtrType when using `id` type
David Kilzer (:ddkilzer)
Reported
2025-04-08 11:23:50 PDT
Fix WTF::RetainPtrType when using `id` type. This regressed in: Some RetainPtr cleanup [v2]
https://bugs.webkit.org/show_bug.cgi?id=288291
rdar://145371975
<
https://commits.webkit.org/290899@main
> Previously the check was `std::is_convertible_v<T, id> && !std::is_same_v<T, id>`: ``` -#ifdef __OBJC__ - using HelperPtrType = typename std::conditional_t<std::is_convertible_v<T, id> && !std::is_same_v<T, id>, std::remove_pointer_t<T>, T>; -#else - using HelperPtrType = PtrType; -#endif ``` But that changed to `IsNSType<T>`: ``` +template<typename T> using RetainPtrType = std::conditional_t<IsNSType<T>, std::remove_pointer_t<T>, T>; ``` Which is defined as: ``` +template<typename T> constexpr bool IsNSType = std::is_convertible_v<T, id>; ``` <
rdar://148273952
>
Attachments
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2025-04-08 11:49:51 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/43804
EWS
Comment 2
2025-04-08 18:44:56 PDT
Committed
293440@main
(43dfb26178e8): <
https://commits.webkit.org/293440@main
> Reviewed commits have been landed. Closing PR #43804 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug