RESOLVED FIXED293988
Allow constructing a `RefPtr<T>` from a `T&` instead of requiring a `T*`
https://bugs.webkit.org/show_bug.cgi?id=293988
Summary Allow constructing a `RefPtr<T>` from a `T&` instead of requiring a `T*`
Chris Dumez
Reported 2025-06-03 15:18:11 PDT
I think this makes sense as we already allow constructing a `RefPtr<T>` from a `Ref<T>&&`, and a `WeakPtr<T>` from a `T&`. This makes our code a little nicer and this avoids having the RefPtr constructor do a null check that is unnecessary (though the compiler hopefully optimizes it out).
Attachments
Chris Dumez
Comment 1 2025-06-03 15:20:06 PDT
EWS
Comment 2 2025-06-03 22:36:22 PDT
Committed 295794@main (c0596157ce8f): <https://commits.webkit.org/295794@main> Reviewed commits have been landed. Closing PR #46284 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2025-06-03 22:37:13 PDT
Note You need to log in before you can comment on or make changes to this bug.