diff --git a/Userland/Libraries/LibJS/Heap/GCPtr.h b/Userland/Libraries/LibJS/Heap/GCPtr.h index 8a821167f6..398a31cb99 100644 --- a/Userland/Libraries/LibJS/Heap/GCPtr.h +++ b/Userland/Libraries/LibJS/Heap/GCPtr.h @@ -6,6 +6,7 @@ #pragma once +#include #include namespace JS { @@ -217,3 +218,23 @@ inline bool operator==(NonnullGCPtr const& a, GCPtr const& b) } } + +namespace AK { + +template +struct Traits> : public GenericTraits> { + static unsigned hash(JS::GCPtr const& value) + { + return Traits::hash(value.ptr()); + } +}; + +template +struct Traits> : public GenericTraits> { + static unsigned hash(JS::NonnullGCPtr const& value) + { + return Traits::hash(value.ptr()); + } +}; + +}