Skip to content

Commit c26b58b

Browse files
committed
LibJS: Add JS::make_handle(T&)
I'm not sure why we only had a T* variant of this.
1 parent 13680ae commit c26b58b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Userland/Libraries/LibJS/Heap/Handle.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,10 @@ inline Handle<T> make_handle(T* cell)
7171
return Handle<T>::create(cell);
7272
}
7373

74+
template<class T>
75+
inline Handle<T> make_handle(T& cell)
76+
{
77+
return Handle<T>::create(&cell);
78+
}
79+
7480
}

0 commit comments

Comments
 (0)