mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Make Window store an @Page instead of a *Page and remove a bunch of unsafe code.
This commit is contained in:
parent
a31d950695
commit
8ae725146c
13 changed files with 52 additions and 69 deletions
|
@ -18,7 +18,7 @@ impl HTMLFormElement {
|
|||
fn get_scope_and_cx(&self) -> (*JSObject, *JSContext) {
|
||||
let doc = self.parent.parent.parent.owner_doc.unwrap();
|
||||
let win = doc.with_base(|doc| doc.window.unwrap());
|
||||
let cx = unsafe {(*win.page).js_info.get_ref().js_compartment.cx.ptr};
|
||||
let cx = win.page.js_info.get_ref().js_compartment.cx.ptr;
|
||||
let cache = win.get_wrappercache();
|
||||
let scope = cache.get_wrapper();
|
||||
(scope, cx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue