mirror of
https://github.com/servo/servo.git
synced 2025-06-21 23:59:00 +01:00
Cleanup some code.
This commit is contained in:
parent
d99e69e244
commit
388f685549
7 changed files with 59 additions and 84 deletions
|
@ -22,9 +22,8 @@ impl Comment {
|
|||
|
||||
pub fn Constructor(owner: @mut Window, data: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
|
||||
let s = null_str_as_empty(data);
|
||||
unsafe {
|
||||
let compartment = (*owner.page).js_info.get_ref().js_compartment;
|
||||
Ok(Node::as_abstract_node(compartment.cx.ptr, @Comment::new(s)))
|
||||
}
|
||||
let cx = (*owner.page).js_info.get_ref().js_compartment.cx.ptr;
|
||||
let comment = @Comment::new(s);
|
||||
Ok(unsafe { Node::as_abstract_node(cx, comment) })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue