Bug 293988

Summary: Allow constructing a `RefPtr<T>` from a `T&` instead of requiring a `T*`
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: Web Template FrameworkAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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.