From 0bcbbafa73c7769810420dce67f3242b6570ffa4 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Fri, 29 Dec 2023 22:56:38 +0100 Subject: [PATCH] No issue - Tighten default script time-outs and expose stop_slow_scripts The timings here are still slightly more lenient than the hard-coded fallback timings in code (10/20 for content/chrome respectively) but we definitely should not need very long time-outs by default on Chrome scripts anymore. Also exposes dom.always_stop_slow_scripts to about:config since we're making it also UI-configurable in Pale Moon and it just makes sense not to hide this option. --- modules/libpref/init/all.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index c1c50c25af..ecf29bef53 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2752,8 +2752,11 @@ pref("editor.resizing.preserve_ratio", true); pref("editor.positioning.offset", 0); pref("dom.use_watchdog", true); -pref("dom.max_chrome_script_run_time", 90); -pref("dom.max_script_run_time", 20); +pref("dom.max_chrome_script_run_time", 30); +pref("dom.max_script_run_time", 15); + +// Automatically terminate non-responsive scripts if script_run_time expires. +pref("dom.always_stop_slow_scripts", false); // Stop all scripts in a compartment when the "stop script" dialog is used. pref("dom.global_stop_script", true);