diff options
author | sagudev <samo.golez@outlook.com> | 2021-03-12 16:26:27 +0100 |
---|---|---|
committer | sagudev <samo.golez@outlook.com> | 2021-03-12 16:26:27 +0100 |
commit | 425057c4323fe9bf3857e2c99912dc10b79166b7 (patch) | |
tree | a97ca3770034b780d8ea457f4b5a53f2acceb74a /components/script/script_runtime.rs | |
parent | 05d5eff26cf4e55daa7a7f18d90918f138a71933 (diff) | |
download | servo-425057c4323fe9bf3857e2c99912dc10b79166b7.tar.gz servo-425057c4323fe9bf3857e2c99912dc10b79166b7.zip |
Fix errors
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r-- | components/script/script_runtime.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs index f60c42f7e46..ca57b157083 100644 --- a/components/script/script_runtime.rs +++ b/components/script/script_runtime.rs @@ -56,7 +56,7 @@ use js::jsapi::{ }; use js::jsapi::{HandleObject, Heap, JobQueue}; use js::jsapi::{JSContext as RawJSContext, JSTracer, SetDOMCallbacks, SetGCSliceCallback}; -use js::jsapi::{JSGCMode, JSGCParamKey, JS_SetGCParameter, JS_SetGlobalJitCompilerOption}; +use js::jsapi::{JSGCParamKey, JS_SetGCParameter, JS_SetGlobalJitCompilerOption}; use js::jsapi::{ JSJitCompilerOption, JS_SetOffthreadIonCompilationEnabled, JS_SetParallelParsingEnabled, }; @@ -591,14 +591,8 @@ unsafe fn new_rt_and_cx_with_parent( .unwrap_or(u32::max_value()), ); // NOTE: This is disabled above, so enabling it here will do nothing for now. - let js_gc_mode = if pref!(js.mem.gc.incremental.enabled) { - JSGCMode::JSGC_MODE_INCREMENTAL - } else if pref!(js.mem.gc.per_zone.enabled) { - JSGCMode::JSGC_MODE_ZONE - } else { - JSGCMode::JSGC_MODE_GLOBAL - }; - JS_SetGCParameter(cx, JSGCParamKey::JSGC_MODE, js_gc_mode as u32); + JS_SetGCParameter(cx, JSGCParamKey::JSGC_INCREMENTAL_GC_ENABLED, pref!(js.mem.gc.incremental.enabled) as u32); + JS_SetGCParameter(cx, JSGCParamKey::JSGC_PER_ZONE_GC_ENABLED, pref!(js.mem.gc.per_zone.enabled) as u32); if let Some(val) = in_range(pref!(js.mem.gc.incremental.slice_ms), 0, 100_000) { JS_SetGCParameter(cx, JSGCParamKey::JSGC_SLICE_TIME_BUDGET_MS, val as u32); } |