aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/nodelist.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2014-03-28 10:17:56 -0400
committerJosh Matthews <josh@joshmatthews.net>2014-05-03 14:18:30 -0400
commitffdc3f5b32a345b88eed774848924e862d47c093 (patch)
tree047371062d728fecca45229a3e2cf87407410ba0 /src/components/script/dom/nodelist.rs
parent4051a8096d7ba7e7f9c86e76d0b4bffd83e85805 (diff)
downloadservo-ffdc3f5b32a345b88eed774848924e862d47c093.tar.gz
servo-ffdc3f5b32a345b88eed774848924e862d47c093.zip
Turn on GC all the time. Fix rooting errors during parsing and storing timers. Fix borrow errors during tracing.
Diffstat (limited to 'src/components/script/dom/nodelist.rs')
-rw-r--r--src/components/script/dom/nodelist.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/script/dom/nodelist.rs b/src/components/script/dom/nodelist.rs
index 714f0e34079..751c15ab098 100644
--- a/src/components/script/dom/nodelist.rs
+++ b/src/components/script/dom/nodelist.rs
@@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::codegen::BindingDeclarations::NodeListBinding;
-use dom::bindings::js::JS;
+use dom::bindings::js::{JS, JSRef};
use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};
use dom::node::{Node, NodeHelpers};
use dom::window::Window;
@@ -31,18 +31,18 @@ impl NodeList {
}
}
- pub fn new(window: &JS<Window>,
+ pub fn new(window: &JSRef<Window>,
list_type: NodeListType) -> JS<NodeList> {
- reflect_dom_object(~NodeList::new_inherited(window.clone(), list_type),
+ reflect_dom_object(~NodeList::new_inherited(window.unrooted(), list_type),
window, NodeListBinding::Wrap)
}
- pub fn new_simple_list(window: &JS<Window>, elements: Vec<JS<Node>>) -> JS<NodeList> {
+ pub fn new_simple_list(window: &JSRef<Window>, elements: Vec<JS<Node>>) -> JS<NodeList> {
NodeList::new(window, Simple(elements))
}
- pub fn new_child_list(window: &JS<Window>, node: &JS<Node>) -> JS<NodeList> {
- NodeList::new(window, Children(node.clone()))
+ pub fn new_child_list(window: &JSRef<Window>, node: &JSRef<Node>) -> JS<NodeList> {
+ NodeList::new(window, Children(node.unrooted()))
}
pub fn Length(&self) -> u32 {