Use IndexSet for storing descendants

Fixes intermittent failures in `/html/semantics/scripting-1/the-script-element/module/choice-of-error-1.html`
This commit is contained in:
Manish Goregaokar 2020-01-06 11:56:27 +05:30
parent e7bc0fae4c
commit 9460b43f90
2 changed files with 31 additions and 12 deletions

View file

@ -311,6 +311,15 @@ unsafe impl<T: JSTraceable> JSTraceable for VecDeque<T> {
}
}
unsafe impl<T: JSTraceable + Eq + Hash> JSTraceable for indexmap::IndexSet<T> {
#[inline]
unsafe fn trace(&self, trc: *mut JSTracer) {
for e in self.iter() {
e.trace(trc);
}
}
}
unsafe impl<A, B, C, D> JSTraceable for (A, B, C, D)
where
A: JSTraceable,