aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/document.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/dom/document.rs')
-rw-r--r--src/components/script/dom/document.rs16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs
index 931221cabe0..59a24c879c8 100644
--- a/src/components/script/dom/document.rs
+++ b/src/components/script/dom/document.rs
@@ -88,11 +88,9 @@ impl AbstractDocument {
}
pub fn set_root(&self, root: AbstractNode<ScriptView>) {
- assert!(root.traverse_preorder().all(|node| {
- do node.with_base |node| {
- node.owner_doc() == *self
- }
- }));
+ assert!(do root.traverse_preorder().all |node| {
+ node.node().owner_doc() == *self
+ });
self.with_mut_base(|document| {
document.root = Some(root);
// Register elements having "id" attribute to the owner doc.
@@ -561,11 +559,9 @@ impl Traceable for Document {
do "root".to_c_str().with_ref |name| {
(*tracer).debugPrintArg = name as *libc::c_void;
debug!("tracing root node");
- do root.with_base |node| {
- JS_CallTracer(tracer as *JSTracer,
- node.reflector_.object,
- JSTRACE_OBJECT as u32);
- }
+ JS_CallTracer(tracer as *JSTracer,
+ root.reflector().get_jsobject(),
+ JSTRACE_OBJECT as u32);
}
}
}