Removed JS::root Fixes #8251

This commit is contained in:
nxnfufunezn 2015-10-31 17:41:00 +05:30
parent 521a87180a
commit d8ef3809a6
25 changed files with 98 additions and 126 deletions

View file

@ -45,7 +45,7 @@ impl Sink {
#[allow(unrooted_must_root)] // method is only run at parse time
pub fn get_or_create(&self, child: NodeOrText<JS<Node>>) -> Root<Node> {
match child {
NodeOrText::AppendNode(n) => n.root(),
NodeOrText::AppendNode(n) => Root::from_ref(&*n),
NodeOrText::AppendText(t) => {
let text = Text::new(t.into(), &self.document);
Root::upcast(text)