aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/comment.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2013-10-13 12:06:32 +0200
committerMs2ger <ms2ger@gmail.com>2013-10-13 12:06:32 +0200
commitda2cf6cbd7cf36ab5aa6043fda95139f2a92a9af (patch)
tree53a0a9cc3afe3da0c5464d3b75843cce0c2f7f9b /src/components/script/dom/comment.rs
parentfc9fdf30a6b4b4437cfe7a624c52c9a8b5e5a645 (diff)
downloadservo-da2cf6cbd7cf36ab5aa6043fda95139f2a92a9af.tar.gz
servo-da2cf6cbd7cf36ab5aa6043fda95139f2a92a9af.zip
Implement Window::get_cx() to reduce code repetition.
Diffstat (limited to 'src/components/script/dom/comment.rs')
-rw-r--r--src/components/script/dom/comment.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/script/dom/comment.rs b/src/components/script/dom/comment.rs
index 51140177f95..7d628434894 100644
--- a/src/components/script/dom/comment.rs
+++ b/src/components/script/dom/comment.rs
@@ -23,7 +23,7 @@ impl Comment {
pub fn Constructor(owner: @mut Window, data: &DOMString) -> Fallible<AbstractNode<ScriptView>> {
let s = null_str_as_empty(data);
- let cx = (*owner.page).js_info.get_ref().js_compartment.cx.ptr;
+ let cx = owner.get_cx();
let comment = @Comment::new(s, owner.Document());
Ok(unsafe { Node::as_abstract_node(cx, comment) })
}