diff --git a/mfbt/HashTable.h b/mfbt/HashTable.h index 116d17f6870b..c1fc716ffec5 100644 --- a/mfbt/HashTable.h +++ b/mfbt/HashTable.h @@ -248,7 +248,14 @@ class HashMap { // false on OOM. template [[nodiscard]] bool put(KeyInput&& aKey, ValueInput&& aValue) { - AddPtr p = lookupForAdd(aKey); + return put(aKey, std::forward(aKey), + std::forward(aValue)); + } + + template + [[nodiscard]] bool put(const Lookup& aLookup, KeyInput&& aKey, + ValueInput&& aValue) { + AddPtr p = lookupForAdd(aLookup); if (p) { p->value() = std::forward(aValue); return true;