aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_runtime.rs
diff options
context:
space:
mode:
authorSimon Wülker <simon.wuelker@arcor.de>2024-08-16 23:30:13 +0200
committerGitHub <noreply@github.com>2024-08-16 21:30:13 +0000
commitf0045a76866f2d56d6a01aaf93ec20177dad778a (patch)
tree2f6749890384a1fcd0fd4d361f0cbd973b3815aa /components/script/script_runtime.rs
parent09cac6430bfc98dace01ccf2a0af40c2420a4d19 (diff)
downloadservo-f0045a76866f2d56d6a01aaf93ec20177dad778a.tar.gz
servo-f0045a76866f2d56d6a01aaf93ec20177dad778a.zip
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>
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r--components/script/script_runtime.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs
index c41b815e98a..03916b14b09 100644
--- a/components/script/script_runtime.rs
+++ b/components/script/script_runtime.rs
@@ -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(