diff options
author | Samson <16504129+sagudev@users.noreply.github.com> | 2024-07-29 14:05:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-29 12:05:02 +0000 |
commit | 976850d92de1dfcf80a06428f9491fa64241f347 (patch) | |
tree | 53613162e91885c1bd54e746504945b84bd8d585 /components/script/script_runtime.rs | |
parent | d132a0273d17a140a916bb4c73cdb1d81fee1d2d (diff) | |
download | servo-976850d92de1dfcf80a06428f9491fa64241f347.tar.gz servo-976850d92de1dfcf80a06428f9491fa64241f347.zip |
Fix debugmozjs compilation (#32875)
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r-- | components/script/script_runtime.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs index ffee9522467..b40795a15fb 100644 --- a/components/script/script_runtime.rs +++ b/components/script/script_runtime.rs @@ -835,7 +835,7 @@ unsafe extern "C" fn servo_build_id(build_id: *mut BuildIdCharVector) -> bool { #[allow(unsafe_code)] #[cfg(feature = "debugmozjs")] unsafe fn set_gc_zeal_options(cx: *mut RawJSContext) { - use js::jsapi::{JS_SetGCZeal, JS_DEFAULT_ZEAL_FREQ}; + use js::jsapi::SetGCZeal; let level = match pref!(js.mem.gc.zeal.level) { level @ 0..=14 => level as u8, @@ -843,9 +843,10 @@ unsafe fn set_gc_zeal_options(cx: *mut RawJSContext) { }; let frequency = match pref!(js.mem.gc.zeal.frequency) { frequency if frequency >= 0 => frequency as u32, - _ => JS_DEFAULT_ZEAL_FREQ, + // https://searchfox.org/mozilla-esr128/source/js/public/GCAPI.h#1392 + _ => 5000, }; - JS_SetGCZeal(cx, level, frequency); + SetGCZeal(cx, level, frequency); } #[allow(unsafe_code)] |