mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update SpiderMonkey
This commit is contained in:
parent
d32648172c
commit
eb94f1a918
21 changed files with 180 additions and 194 deletions
|
@ -37,7 +37,7 @@ use gfx_traits::LayerId;
|
|||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use js::jsapi::{Evaluate2, MutableHandleValue};
|
||||
use js::jsapi::{HandleValue, JSContext};
|
||||
use js::jsapi::{JSAutoCompartment, JSAutoRequest, JS_GC, JS_GetRuntime};
|
||||
use js::jsapi::{JSAutoCompartment, JSAutoRequest, JS_GC, JS_GetRuntime, SetWindowProxy};
|
||||
use js::rust::CompileOptionsWrapper;
|
||||
use js::rust::Runtime;
|
||||
use layout_interface::{ContentBoxResponse, ContentBoxesResponse, ResolvedStyleResponse, ScriptReflow};
|
||||
|
@ -1192,9 +1192,15 @@ impl Window {
|
|||
self.layout_rpc.margin_style()
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
pub fn init_browsing_context(&self, browsing_context: &BrowsingContext) {
|
||||
assert!(self.browsing_context.get().is_none());
|
||||
self.browsing_context.set(Some(&browsing_context));
|
||||
let window = self.reflector().get_jsobject();
|
||||
let cx = self.get_cx();
|
||||
let _ar = JSAutoRequest::new(cx);
|
||||
let _ac = JSAutoCompartment::new(cx, window.get());
|
||||
unsafe { SetWindowProxy(cx, window, browsing_context.reflector().get_jsobject()); }
|
||||
}
|
||||
|
||||
/// Commence a new URL load which will either replace this window or scroll to a fragment.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue