diff --git a/xpcom/base/MemoryPressureLevelMac.h b/xpcom/base/MemoryPressureLevelMac.h index ec5c11ee2747..38cb49a4fd91 100644 --- a/xpcom/base/MemoryPressureLevelMac.h +++ b/xpcom/base/MemoryPressureLevelMac.h @@ -26,8 +26,8 @@ class MacMemoryPressureLevel { MacMemoryPressureLevel() : mValue(Value::eUnset) {} MOZ_IMPLICIT MacMemoryPressureLevel(Value aValue) : mValue(aValue) {} - bool operator==(const Value& aRhsValue) { return mValue == aRhsValue; } - bool operator==(const MacMemoryPressureLevel& aRhs) { + bool operator==(const Value& aRhsValue) const { return mValue == aRhsValue; } + bool operator==(const MacMemoryPressureLevel& aRhs) const { return mValue == aRhs.mValue; } diff --git a/xpcom/ds/PLDHashTable.h b/xpcom/ds/PLDHashTable.h index af17ee6fd616..67e4d7fdcf7b 100644 --- a/xpcom/ds/PLDHashTable.h +++ b/xpcom/ds/PLDHashTable.h @@ -222,7 +222,9 @@ class PLDHashTable { Slot& operator=(Slot&& aOther) = default; - bool operator==(const Slot& aOther) { return mEntry == aOther.mEntry; } + bool operator==(const Slot& aOther) const { + return mEntry == aOther.mEntry; + } PLDHashNumber KeyHash() const { return *HashPtr(); } void SetKeyHash(PLDHashNumber aHash) { *HashPtr() = aHash; }