diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-05-31 01:13:59 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-05-31 14:54:19 +0200 |
commit | 88f8a22269482f798c8c63af4d179e3b6149d505 (patch) | |
tree | 4d4d5bc47ac73c9dd9c195798840377db0cd2f0a | |
parent | 3eb9403b4d7309ccfa030348fa174b0decc958d7 (diff) | |
download | servo-88f8a22269482f798c8c63af4d179e3b6149d505.tar.gz servo-88f8a22269482f798c8c63af4d179e3b6149d505.zip |
Bump rust-mozjs for the safe Runtime::new (fixes #11512)
-rw-r--r-- | components/script/dom/dedicatedworkerglobalscope.rs | 2 | ||||
-rw-r--r-- | components/script/script_runtime.rs | 4 | ||||
-rw-r--r-- | components/script/script_thread.rs | 2 | ||||
-rw-r--r-- | components/servo/Cargo.lock | 3 | ||||
-rw-r--r-- | ports/cef/Cargo.lock | 3 |
5 files changed, 8 insertions, 6 deletions
diff --git a/components/script/dom/dedicatedworkerglobalscope.rs b/components/script/dom/dedicatedworkerglobalscope.rs index 295b0029cb3..d658163c233 100644 --- a/components/script/dom/dedicatedworkerglobalscope.rs +++ b/components/script/dom/dedicatedworkerglobalscope.rs @@ -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)); let (devtools_mpsc_chan, devtools_mpsc_port) = channel(); diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs index 2b2e2437e16..543574ccc62 100644 --- a/components/script/script_runtime.rs +++ b/components/script/script_runtime.rs @@ -95,9 +95,9 @@ impl<'a> Drop for StackRootTLS<'a> { } #[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(); - 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_refcounted_objects), ptr::null_mut()); diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index a1e563d23d1..20a8602a249 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -521,7 +521,7 @@ impl ScriptThread { port: Receiver<MainThreadScriptMsg>, chan: Sender<MainThreadScriptMsg>) -> ScriptThread { - let runtime = unsafe { new_rt_and_cx(ptr::null_mut()) }; + let runtime = unsafe { new_rt_and_cx() }; unsafe { JS_SetWrapObjectCallbacks(runtime.rt(), diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 2a12a2d75d7..53875b3957c 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -1079,9 +1079,10 @@ dependencies = [ [[package]] name = "js" version = "0.1.3" -source = "git+https://github.com/servo/rust-mozjs#fae7efd0adf42c0dde517382b83734525e11c6cc" +source = "git+https://github.com/servo/rust-mozjs#c6f6817a7beb7f310050e1dde88654a95de6df26" dependencies = [ "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)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)", diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 29e487441b7..9029fa2cbfd 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -991,9 +991,10 @@ dependencies = [ [[package]] name = "js" version = "0.1.3" -source = "git+https://github.com/servo/rust-mozjs#fae7efd0adf42c0dde517382b83734525e11c6cc" +source = "git+https://github.com/servo/rust-mozjs#c6f6817a7beb7f310050e1dde88654a95de6df26" dependencies = [ "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)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "mozjs_sys 0.0.0 (git+https://github.com/servo/mozjs)", |