diff options
author | Ms2ger <ms2ger@gmail.com> | 2013-10-13 12:06:32 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2013-10-13 12:06:32 +0200 |
commit | da2cf6cbd7cf36ab5aa6043fda95139f2a92a9af (patch) | |
tree | 53a0a9cc3afe3da0c5464d3b75843cce0c2f7f9b /src/components/script/dom/text.rs | |
parent | fc9fdf30a6b4b4437cfe7a624c52c9a8b5e5a645 (diff) | |
download | servo-da2cf6cbd7cf36ab5aa6043fda95139f2a92a9af.tar.gz servo-da2cf6cbd7cf36ab5aa6043fda95139f2a92a9af.zip |
Implement Window::get_cx() to reduce code repetition.
Diffstat (limited to 'src/components/script/dom/text.rs')
-rw-r--r-- | src/components/script/dom/text.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/components/script/dom/text.rs b/src/components/script/dom/text.rs index 793ee18f000..71c538a7d6c 100644 --- a/src/components/script/dom/text.rs +++ b/src/components/script/dom/text.rs @@ -22,7 +22,7 @@ impl Text { } pub fn Constructor(owner: @mut Window, text: &DOMString) -> Fallible<AbstractNode<ScriptView>> { - let cx = owner.page.js_info.get_ref().js_compartment.cx.ptr; + let cx = owner.get_cx(); let text = @Text::new(null_str_as_empty(text), owner.Document()); Ok(unsafe { Node::as_abstract_node(cx, text) }) } |