Switched Element::Get_attributes to use a RootedVec instead of returning a Vec<Temporary>, fixes #5684

This commit is contained in:
Peter 2015-04-14 16:37:10 -04:00
parent 886805d76c
commit a270f3e39b
2 changed files with 15 additions and 15 deletions

View file

@ -2524,9 +2524,9 @@ impl<'a> style::node::TNode<'a> for JSRef<'a, Node> {
})
},
NamespaceConstraint::Any => {
self.as_element().get_attributes(local_name).into_iter()
.map(|attr| attr.root())
.any(|attr| {
let mut attributes: RootedVec<JS<Attr>> = RootedVec::new();
self.as_element().get_attributes(local_name, &mut attributes);
attributes.iter().map(|attr| attr.root()).any(|attr| {
// FIXME(https://github.com/rust-lang/rust/issues/23338)
let attr = attr.r();
let value = attr.value();