mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove unsound Root::deref() call in BrowserContext::create_window_proxy.
This commit is contained in:
parent
925058ef26
commit
740ee84809
1 changed files with 2 additions and 1 deletions
|
@ -49,13 +49,14 @@ impl BrowserContext {
|
|||
|
||||
fn create_window_proxy(&mut self) {
|
||||
let win = self.active_window().root();
|
||||
let win = win.r();
|
||||
let page = win.page();
|
||||
let js_info = page.js_info();
|
||||
|
||||
let WindowProxyHandler(handler) = js_info.as_ref().unwrap().dom_static.windowproxy_handler;
|
||||
assert!(handler.is_not_null());
|
||||
|
||||
let parent = win.r().reflector().get_jsobject();
|
||||
let parent = win.reflector().get_jsobject();
|
||||
let cx = js_info.as_ref().unwrap().js_context.ptr;
|
||||
let wrapper = with_compartment(cx, parent, || unsafe {
|
||||
WrapperNew(cx, parent, handler)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue