summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Heap/Handle.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Heap/Handle.h')
-rw-r--r--Userland/Libraries/LibJS/Heap/Handle.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Heap/Handle.h b/Userland/Libraries/LibJS/Heap/Handle.h
index 8aee4a348b..5df24c7d03 100644
--- a/Userland/Libraries/LibJS/Heap/Handle.h
+++ b/Userland/Libraries/LibJS/Heap/Handle.h
@@ -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);
+}
+
}