diff --git a/Userland/Libraries/LibJS/Heap/GCPtr.h b/Userland/Libraries/LibJS/Heap/GCPtr.h index 398a31cb99..3ab7e54994 100644 --- a/Userland/Libraries/LibJS/Heap/GCPtr.h +++ b/Userland/Libraries/LibJS/Heap/GCPtr.h @@ -100,6 +100,18 @@ public: { } + GCPtr(GCPtr const& other) + : m_ptr(other.ptr()) + { + } + + template + GCPtr(GCPtr const& other) + requires(IsConvertible) + : m_ptr(other.ptr()) + { + } + GCPtr(NonnullGCPtr const& other) : m_ptr(other.ptr()) { @@ -117,7 +129,6 @@ public: { } - GCPtr(GCPtr const&) = default; GCPtr& operator=(GCPtr const&) = default; template