mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Bump rust-mozjs for the safe Runtime::new (fixes #11512)
This commit is contained in:
parent
3eb9403b4d
commit
88f8a22269
5 changed files with 8 additions and 6 deletions
|
@ -240,7 +240,7 @@ impl DedicatedWorkerGlobalScope {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let runtime = unsafe { new_rt_and_cx(parent_rt.rt()) };
|
let runtime = unsafe { new_rt_and_cx() };
|
||||||
*worker_rt_for_mainthread.lock().unwrap() = Some(SharedRt::new(&runtime));
|
*worker_rt_for_mainthread.lock().unwrap() = Some(SharedRt::new(&runtime));
|
||||||
|
|
||||||
let (devtools_mpsc_chan, devtools_mpsc_port) = channel();
|
let (devtools_mpsc_chan, devtools_mpsc_port) = channel();
|
||||||
|
|
|
@ -95,9 +95,9 @@ impl<'a> Drop for StackRootTLS<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unsafe_code)]
|
#[allow(unsafe_code)]
|
||||||
pub unsafe fn new_rt_and_cx(parent_rt: *mut JSRuntime) -> Runtime {
|
pub unsafe fn new_rt_and_cx() -> Runtime {
|
||||||
LiveDOMReferences::initialize();
|
LiveDOMReferences::initialize();
|
||||||
let runtime = Runtime::new(parent_rt);
|
let runtime = Runtime::new();
|
||||||
|
|
||||||
JS_AddExtraGCRootsTracer(runtime.rt(), Some(trace_rust_roots), ptr::null_mut());
|
JS_AddExtraGCRootsTracer(runtime.rt(), Some(trace_rust_roots), ptr::null_mut());
|
||||||
JS_AddExtraGCRootsTracer(runtime.rt(), Some(trace_refcounted_objects), ptr::null_mut());
|
JS_AddExtraGCRootsTracer(runtime.rt(), Some(trace_refcounted_objects), ptr::null_mut());
|
||||||
|
|
|
@ -521,7 +521,7 @@ impl ScriptThread {
|
||||||
port: Receiver<MainThreadScriptMsg>,
|
port: Receiver<MainThreadScriptMsg>,
|
||||||
chan: Sender<MainThreadScriptMsg>)
|
chan: Sender<MainThreadScriptMsg>)
|
||||||
-> ScriptThread {
|
-> ScriptThread {
|
||||||
let runtime = unsafe { new_rt_and_cx(ptr::null_mut()) };
|
let runtime = unsafe { new_rt_and_cx() };
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
JS_SetWrapObjectCallbacks(runtime.rt(),
|
JS_SetWrapObjectCallbacks(runtime.rt(),
|
||||||
|
|
3
components/servo/Cargo.lock
generated
3
components/servo/Cargo.lock
generated
|
@ -1079,9 +1079,10 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "js"
|
name = "js"
|
||||||
version = "0.1.3"
|
version = "0.1.3"
|
||||||
source = "git+https://github.com/servo/rust-mozjs#fae7efd0adf42c0dde517382b83734525e11c6cc"
|
source = "git+https://github.com/servo/rust-mozjs#c6f6817a7beb7f310050e1dde88654a95de6df26"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
|
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
|
||||||
|
|
3
ports/cef/Cargo.lock
generated
3
ports/cef/Cargo.lock
generated
|
@ -991,9 +991,10 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "js"
|
name = "js"
|
||||||
version = "0.1.3"
|
version = "0.1.3"
|
||||||
source = "git+https://github.com/servo/rust-mozjs#fae7efd0adf42c0dde517382b83734525e11c6cc"
|
source = "git+https://github.com/servo/rust-mozjs#c6f6817a7beb7f310050e1dde88654a95de6df26"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
"heapsize 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"lazy_static 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
|
"mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue