diff --git a/src/components/script/dom/document.rs b/src/components/script/dom/document.rs index dc8cec50668..d0a40235878 100644 --- a/src/components/script/dom/document.rs +++ b/src/components/script/dom/document.rs @@ -209,11 +209,6 @@ impl Document { self.window.get_cx() } - fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) { - let win = self.window; - (win.reflector().get_jsobject(), win.get_cx()) - } - pub fn GetElementsByTagName(&self, tag: &DOMString) -> @mut HTMLCollection { self.createHTMLCollection(|elem| eq_slice(elem.tag_name, null_str_as_empty(tag))) } @@ -304,7 +299,6 @@ impl Document { fail!("no SVG document yet") }, _ => { - let (_scope, cx) = self.get_scope_and_cx(); match self.GetDocumentElement() { None => {}, Some(root) => { @@ -329,7 +323,7 @@ impl Document { htmlelement: HTMLElement::new(HTMLTitleElementTypeId, ~"title", abstract_self) }; let new_title = unsafe { - Node::as_abstract_node(cx, new_title) + Node::as_abstract_node(self.get_cx(), new_title) }; new_title.add_child(self.CreateTextNode(abstract_self, title)); node.add_child(new_title); diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs index 15d2b47c0a9..9b8f7ea1b07 100644 --- a/src/components/script/dom/node.rs +++ b/src/components/script/dom/node.rs @@ -673,11 +673,6 @@ impl Node { } } - pub fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) { - let win = self.owner_doc().document().window; - (win.reflector().get_jsobject(), win.get_cx()) - } - // http://dom.spec.whatwg.org/#concept-node-replace-all pub fn replace_all(&mut self, abstract_self: AbstractNode,