Use a simple Temporary value in TreeIterator

This commit is contained in:
Anthony Ramine 2015-04-11 14:12:44 +02:00
parent c026825e69
commit e20d997b37
9 changed files with 156 additions and 133 deletions

View file

@ -69,8 +69,8 @@ fn find_node_by_unique_id(page: &Rc<Page>, pipeline: PipelineId, node_id: String
let node: JSRef<Node> = NodeCast::from_ref(document.r());
for candidate in node.traverse_preorder() {
if candidate.get_unique_id() == node_id {
return Temporary::from_rooted(candidate);
if candidate.root().r().get_unique_id() == node_id {
return candidate;
}
}