mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
auto merge of #2532 : Ms2ger/servo/create_window_proxy, r=jdm
This commit is contained in:
commit
eaae994d57
1 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@ impl BrowserContext {
|
||||||
active_index: 0,
|
active_index: 0,
|
||||||
window_proxy: Traceable::new(ptr::mut_null()),
|
window_proxy: Traceable::new(ptr::mut_null()),
|
||||||
};
|
};
|
||||||
context.window_proxy = Traceable::new(context.create_window_proxy());
|
context.create_window_proxy();
|
||||||
context
|
context
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ impl BrowserContext {
|
||||||
*self.window_proxy
|
*self.window_proxy
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_window_proxy(&self) -> *mut JSObject {
|
fn create_window_proxy(&mut self) {
|
||||||
let win = self.active_window().root();
|
let win = self.active_window().root();
|
||||||
let page = win.deref().page();
|
let page = win.deref().page();
|
||||||
let js_info = page.js_info();
|
let js_info = page.js_info();
|
||||||
|
@ -61,7 +61,7 @@ impl BrowserContext {
|
||||||
WrapperNew(cx, parent, *handler.deref())
|
WrapperNew(cx, parent, *handler.deref())
|
||||||
});
|
});
|
||||||
assert!(wrapper.is_not_null());
|
assert!(wrapper.is_not_null());
|
||||||
wrapper
|
self.window_proxy = Traceable::new(wrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue