1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

LibJS: Add JS::make_handle(T&)

I'm not sure why we only had a T* variant of this.
This commit is contained in:
Andreas Kling 2021-12-12 22:06:43 +01:00
parent 13680ae038
commit c26b58bc53

View file

@ -71,4 +71,10 @@ inline Handle<T> make_handle(T* cell)
return Handle<T>::create(cell);
}
template<class T>
inline Handle<T> make_handle(T& cell)
{
return Handle<T>::create(&cell);
}
}