diff --git a/mfbt/HashTable.h b/mfbt/HashTable.h index 6d16a8a3c83c..5c26e43f3a92 100644 --- a/mfbt/HashTable.h +++ b/mfbt/HashTable.h @@ -2112,16 +2112,6 @@ public: return aMallocSizeOf(this) + shallowSizeOfExcludingThis(aMallocSizeOf); } - MOZ_ALWAYS_INLINE Ptr lookup(const Lookup& aLookup) const - { - ReentrancyGuard g(*this); - if (!HasHash(aLookup)) { - return Ptr(); - } - HashNumber keyHash = prepareHash(aLookup); - return Ptr(lookup(aLookup, keyHash), *this); - } - MOZ_ALWAYS_INLINE Ptr readonlyThreadsafeLookup(const Lookup& aLookup) const { if (!HasHash(aLookup)) { @@ -2131,6 +2121,12 @@ public: return Ptr(lookup(aLookup, keyHash), *this); } + MOZ_ALWAYS_INLINE Ptr lookup(const Lookup& aLookup) const + { + ReentrancyGuard g(*this); + return readonlyThreadsafeLookup(aLookup); + } + MOZ_ALWAYS_INLINE AddPtr lookupForAdd(const Lookup& aLookup) const { ReentrancyGuard g(*this);