summaryrefslogtreecommitdiffstats
path: root/dom/bindings/Record.h
diff options
context:
space:
mode:
authorJustOff <Off.Just.Off@gmail.com>2019-03-13 20:19:53 +0200
committerJustOff <Off.Just.Off@gmail.com>2019-03-13 20:19:53 +0200
commitca23830127a2123100e52e644302e23143d8369a (patch)
treef5813ad4e0e54fe76e4003ad7d5639503e3422bf /dom/bindings/Record.h
parente7c9fa3e1505aeb90385e0a4e90fe5e0b137d4ab (diff)
downloadUXP-ca23830127a2123100e52e644302e23143d8369a.tar
UXP-ca23830127a2123100e52e644302e23143d8369a.tar.gz
UXP-ca23830127a2123100e52e644302e23143d8369a.tar.lz
UXP-ca23830127a2123100e52e644302e23143d8369a.tar.xz
UXP-ca23830127a2123100e52e644302e23143d8369a.zip
Implement the spec provision for handling repeated keys in records by updating the existing value
Diffstat (limited to 'dom/bindings/Record.h')
-rw-r--r--dom/bindings/Record.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/dom/bindings/Record.h b/dom/bindings/Record.h
index b7f7b01b0..d6ab31699 100644
--- a/dom/bindings/Record.h
+++ b/dom/bindings/Record.h
@@ -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