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
293988
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
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2025-06-03 15:20:06 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/46284
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
<
rdar://problem/152555009
>
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