1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:27:43 +00:00

LibJS: Allow constructing a Handle<T> from a {Nonnull,}GCPtr<T>

This commit is contained in:
Matthew Olsson 2023-02-26 16:08:46 -07:00 committed by Andreas Kling
parent 5094dcf615
commit 1df3652e27

View file

@ -60,6 +60,16 @@ public:
{
}
Handle(GCPtr<T> cell)
: Handle(cell.ptr())
{
}
Handle(NonnullGCPtr<T> cell)
: Handle(*cell)
{
}
T* cell() const
{
if (!m_impl)