remove usage of legacy numeric operations in script (#33095)

These operations are deprecated and might be removed
in a future rust version. Clippy is also complaining
about them.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2024-08-16 23:30:13 +02:00 committed by GitHub
parent 09cac6430b
commit f0045a7686
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 11 deletions

View file

@ -630,7 +630,7 @@ unsafe fn new_rt_and_cx_with_parent(
if pref!(js.baseline_jit.unsafe_eager_compilation.enabled) {
0
} else {
u32::max_value()
u32::MAX
},
);
JS_SetGlobalJitCompilerOption(
@ -639,7 +639,7 @@ unsafe fn new_rt_and_cx_with_parent(
if pref!(js.ion.unsafe_eager_compilation.enabled) {
0
} else {
u32::max_value()
u32::MAX
},
);
// TODO: handle js.discard_system_source.enabled
@ -652,7 +652,7 @@ unsafe fn new_rt_and_cx_with_parent(
JSGCParamKey::JSGC_MAX_BYTES,
in_range(pref!(js.mem.max), 1, 0x100)
.map(|val| (val * 1024 * 1024) as u32)
.unwrap_or(u32::max_value()),
.unwrap_or(u32::MAX),
);
// NOTE: This is disabled above, so enabling it here will do nothing for now.
JS_SetGCParameter(