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

LibJS: Handle both const and non-const Ts in Handle<T>::create()

Again, the const-ness only really involves Heap-internal metadata, so
the callers shouldn't care about mutations here.
This commit is contained in:
Matthew Olsson 2023-02-25 10:44:31 -07:00 committed by Linus Groh
parent 74e93a46ea
commit 70a2ca7fc0
6 changed files with 10 additions and 10 deletions

View file

@ -46,7 +46,7 @@ public:
static Handle create(T* cell)
{
return Handle(adopt_ref(*new HandleImpl(cell)));
return Handle(adopt_ref(*new HandleImpl(const_cast<RemoveConst<T>*>(cell))));
}
Handle(T* cell)