diff options
author | Ms2ger <Ms2ger@gmail.com> | 2016-07-29 10:24:42 +0200 |
---|---|---|
committer | Ms2ger <Ms2ger@gmail.com> | 2016-07-29 10:24:42 +0200 |
commit | decc57f2ade23156e348e591453bf6c96715680e (patch) | |
tree | 7ee404cf021027eae80f9e9520e38ff3f9037c0a /components/script/script_runtime.rs | |
parent | 5a611427206e7075934bb077cc931b713adba5b6 (diff) | |
download | servo-decc57f2ade23156e348e591453bf6c96715680e.tar.gz servo-decc57f2ade23156e348e591453bf6c96715680e.zip |
Correct the call to JS_SetGCZeal.
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r-- | components/script/script_runtime.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs index d07491d8ce8..dfbb5ba5203 100644 --- a/components/script/script_runtime.rs +++ b/components/script/script_runtime.rs @@ -120,7 +120,7 @@ pub unsafe fn new_rt_and_cx() -> Runtime { // Pre barriers aren't working correctly at the moment DisableIncrementalGC(runtime.rt()); - set_gc_zeal_options(runtime.cx()); + set_gc_zeal_options(runtime.rt()); // Enable or disable the JITs. let rt_opts = &mut *RuntimeOptionsRef(runtime.rt()); @@ -400,7 +400,7 @@ unsafe extern fn trace_rust_roots(tr: *mut JSTracer, _data: *mut os::raw::c_void #[allow(unsafe_code)] #[cfg(feature = "debugmozjs")] -unsafe fn set_gc_zeal_options(cx: *mut JSContext) { +unsafe fn set_gc_zeal_options(rt: *mut JSRuntime) { use js::jsapi::{JS_DEFAULT_ZEAL_FREQ, JS_SetGCZeal}; let level = match PREFS.get("js.mem.gc.zeal.level").as_i64() { @@ -411,9 +411,9 @@ unsafe fn set_gc_zeal_options(cx: *mut JSContext) { Some(frequency) if frequency >= 0 => frequency as u32, _ => JS_DEFAULT_ZEAL_FREQ, }; - JS_SetGCZeal(cx, level, frequency); + JS_SetGCZeal(rt, level, frequency); } #[allow(unsafe_code)] #[cfg(not(feature = "debugmozjs"))] -unsafe fn set_gc_zeal_options(_: *mut JSContext) {} +unsafe fn set_gc_zeal_options(_: *mut JSRuntime) {} |