diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs index 1ef1d93a86d..7c44555924d 100644 --- a/components/script/dom/bindings/js.rs +++ b/components/script/dom/bindings/js.rs @@ -260,6 +260,12 @@ impl HeapSizeOf for MutHeap { } } +impl PartialEq for MutHeap> { + fn eq(&self, other: &MutHeap>) -> bool { + self.get().eq(&other.get()) + } +} + /// A holder that provides interior mutability for GC-managed values such as /// `JS`, with nullability represented by an enclosing Option wrapper. /// Essentially a `Cell>>`, but safer. @@ -337,6 +343,12 @@ impl HeapSizeOf for MutNullableHeap { } } +impl PartialEq for MutNullableHeap> { + fn eq(&self, other: &MutNullableHeap>) -> bool { + self.get().eq(&other.get()) + } +} + impl LayoutJS { /// Returns an unsafe pointer to the interior of this JS object. This is /// the only method that be safely accessed from layout. (The fact that