servo: Merge #1058 - Use Window::get_cx() in DocumentFragment::Constructor (from Ms2ger:get_cx-followup); r=jdm
authorMs2ger <ms2ger@gmail.com>
Mon, 14 Oct 2013 15:30:55 -0700
changeset 380364 7e6bb15ffb8b0907e2e84e9864e68ea7711619d1
parent 380363 30f09108a5ea6aab90b116f8f93e8433a877d692
child 380365 640a11c28262655c63e98bdd1965e818818cf031
push id7198
push userjlorenzo@mozilla.com
push dateTue, 18 Apr 2017 12:07:49 +0000
treeherdermozilla-beta@d57aa49c3948 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdm
servo: Merge #1058 - Use Window::get_cx() in DocumentFragment::Constructor (from Ms2ger:get_cx-followup); r=jdm These changes landed in parallel. Source-Repo: https://github.com/servo/servo Source-Revision: a3d3337aedea8498e5bea10c483f6869d52a63d6
servo/src/components/script/dom/documentfragment.rs
--- a/servo/src/components/script/dom/documentfragment.rs
+++ b/servo/src/components/script/dom/documentfragment.rs
@@ -16,13 +16,13 @@ impl DocumentFragment {
     /// Creates a new DocumentFragment.
     pub fn new(document: AbstractDocument) -> DocumentFragment {
         DocumentFragment {
             node: Node::new(DocumentFragmentNodeTypeId, document),
         }
     }
 
     pub fn Constructor(owner: @mut Window) -> Fallible<AbstractNode<ScriptView>> {
-        let cx = owner.page.js_info.get_ref().js_compartment.cx.ptr;
+        let cx = owner.get_cx();
         let fragment = @DocumentFragment::new(owner.Document());
         Ok(unsafe { Node::as_abstract_node(cx, fragment) })
     }
 }