Implement Window::get_cx() to reduce code repetition.

This commit is contained in:
Ms2ger 2013-10-13 12:06:32 +02:00
parent fc9fdf30a6
commit da2cf6cbd7
8 changed files with 19 additions and 19 deletions

View file

@ -29,8 +29,7 @@ impl HTMLDocument {
parent: Document::new(window, HTML)
};
let compartment = window.get_ref().page.js_info.get_ref().js_compartment;
AbstractDocument::as_abstract(compartment.cx.ptr, doc)
AbstractDocument::as_abstract(window.get_ref().get_cx(), doc)
}
}