mirror of
https://github.com/servo/servo.git
synced 2025-06-21 23:59:00 +01:00
Implement Window::get_cx() to reduce code repetition.
This commit is contained in:
parent
fc9fdf30a6
commit
da2cf6cbd7
8 changed files with 19 additions and 19 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue