aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
authorPeter <ptrgonda@gmail.com>2015-04-14 16:37:10 -0400
committerPeter <ptrgonda@gmail.com>2015-04-27 10:04:54 -0400
commita270f3e39b97bcb8a5ba47267269e96786adc5ee (patch)
tree13ab4c19a286a6bbc54e687234594cc0fa059f04 /components/script/dom/node.rs
parent886805d76c206214047c475c6f8947c8c38c40b7 (diff)
downloadservo-a270f3e39b97bcb8a5ba47267269e96786adc5ee.tar.gz
servo-a270f3e39b97bcb8a5ba47267269e96786adc5ee.zip
Switched Element::Get_attributes to use a RootedVec instead of returning a Vec<Temporary>, fixes #5684
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index ca7d7598480..238c5c34431 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -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();