Implement the spec provision for handling repeated keys in records by updating the existing value

This commit is contained in:
JustOff 2019-03-13 20:19:53 +02:00 committed by Roy Tam
commit 5755645f0d
2 changed files with 46 additions and 9 deletions

View file

@ -77,4 +77,15 @@ private:
} // namespace dom
} // namespace mozilla
template<typename K, typename V>
class nsDefaultComparator<mozilla::dom::binding_detail::RecordEntry<K, V>, K>
{
public:
bool Equals(const mozilla::dom::binding_detail::RecordEntry<K, V>& aEntry,
const K& aKey) const
{
return aEntry.mKey == aKey;
}
};
#endif // mozilla_dom_Record_h