aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_runtime.rs
diff options
context:
space:
mode:
authorMukilan Thiyagarajan <mukilan@igalia.com>2024-02-07 09:29:28 +0530
committerGitHub <noreply@github.com>2024-02-07 03:59:28 +0000
commitd8958f96933e3691c10ff1347e71735b933f9398 (patch)
tree35d5c2207805c28928244c0a2d7b3bb6ad38bc83 /components/script/script_runtime.rs
parent64116eff207f349f53ec56b35cc242d46384afee (diff)
downloadservo-d8958f96933e3691c10ff1347e71735b933f9398.tar.gz
servo-d8958f96933e3691c10ff1347e71735b933f9398.zip
android: disable JIT in SM to workaround #31134 (#31270)
The crash when loading servo.org happens in the JIT code emitted by SM's CacheIRCompiler to invoke the VM function `ProxyGetPropertyByValue`. To disable this code path, it is not sufficient to disable just the baseline JIT (which exposed in servo under the pref `js.baseline.enabled`) but also the baseline interpreter which is controlled by a different flag in SM. This PR disables renames the `js.baseline.enabled` pref in Servo to `js.baseline_jit.enabled` and introduces a new pref `js.baseline_interpreter.enabled` that controls the baseline interpreter. Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Diffstat (limited to 'components/script/script_runtime.rs')
-rw-r--r--components/script/script_runtime.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/components/script/script_runtime.rs b/components/script/script_runtime.rs
index f797a61e212..476617e05d5 100644
--- a/components/script/script_runtime.rs
+++ b/components/script/script_runtime.rs
@@ -532,8 +532,13 @@ unsafe fn new_rt_and_cx_with_parent(
let cx_opts = &mut *ContextOptionsRef(cx);
JS_SetGlobalJitCompilerOption(
cx,
+ JSJitCompilerOption::JSJITCOMPILER_BASELINE_INTERPRETER_ENABLE,
+ pref!(js.baseline_interpreter.enabled) as u32,
+ );
+ JS_SetGlobalJitCompilerOption(
+ cx,
JSJitCompilerOption::JSJITCOMPILER_BASELINE_ENABLE,
- pref!(js.baseline.enabled) as u32,
+ pref!(js.baseline_jit.enabled) as u32,
);
JS_SetGlobalJitCompilerOption(
cx,
@@ -564,7 +569,7 @@ unsafe fn new_rt_and_cx_with_parent(
JS_SetGlobalJitCompilerOption(
cx,
JSJitCompilerOption::JSJITCOMPILER_BASELINE_WARMUP_TRIGGER,
- if pref!(js.baseline.unsafe_eager_compilation.enabled) {
+ if pref!(js.baseline_jit.unsafe_eager_compilation.enabled) {
0
} else {
u32::max_value()