aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-05-31 14:43:58 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-05-31 14:43:58 +0200
commitb45f1918d16a4c94a18968dc6b69b74408f71083 (patch)
treef255ab743ffb86040631275e90330625973dceff /components/script/dom/document.rs
parent134fd1876718e9e547873c5d1acf140ae5d6aaac (diff)
downloadservo-b45f1918d16a4c94a18968dc6b69b74408f71083.tar.gz
servo-b45f1918d16a4c94a18968dc6b69b74408f71083.zip
Remove JS::from_rooted
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r--components/script/dom/document.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index a12f122e2c6..7729fe5a29a 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -983,13 +983,13 @@ impl Document {
match event_type {
TouchEventType::Down => {
// Add a new touch point
- self.active_touch_points.borrow_mut().push(JS::from_rooted(&touch));
+ self.active_touch_points.borrow_mut().push(JS::from_ref(&*touch));
}
TouchEventType::Move => {
// Replace an existing touch point
let mut active_touch_points = self.active_touch_points.borrow_mut();
match active_touch_points.iter_mut().find(|t| t.Identifier() == identifier) {
- Some(t) => *t = JS::from_rooted(&touch),
+ Some(t) => *t = JS::from_ref(&*touch),
None => warn!("Got a touchmove event for a non-active touch point"),
}
}
@@ -1010,7 +1010,7 @@ impl Document {
touches.extend(self.active_touch_points.borrow().iter().cloned());
let mut changed_touches = RootedVec::new();
- changed_touches.push(JS::from_rooted(&touch));
+ changed_touches.push(JS::from_ref(&*touch));
let mut target_touches = RootedVec::new();
target_touches.extend(self.active_touch_points
@@ -1775,7 +1775,7 @@ impl Document {
node.get_stylesheet()
} else {
None
- }.map(|stylesheet| (JS::from_rooted(&node), stylesheet))
+ }.map(|stylesheet| (JS::from_ref(&*node), stylesheet))
})
.collect());
};
@@ -1998,7 +1998,7 @@ impl DocumentMethods for Document {
self.upcast(),
tag_atom,
ascii_lower_tag);
- entry.insert(JS::from_rooted(&result));
+ entry.insert(JS::from_ref(&*result));
result
}
}
@@ -2016,7 +2016,7 @@ impl DocumentMethods for Document {
Occupied(entry) => Root::from_ref(entry.get()),
Vacant(entry) => {
let result = HTMLCollection::by_qual_tag_name(&self.window, self.upcast(), qname);
- entry.insert(JS::from_rooted(&result));
+ entry.insert(JS::from_ref(&*result));
result
}
}
@@ -2033,7 +2033,7 @@ impl DocumentMethods for Document {
let result = HTMLCollection::by_atomic_class_name(&self.window,
self.upcast(),
class_atoms);
- entry.insert(JS::from_rooted(&result));
+ entry.insert(JS::from_ref(&*result));
result
}
}