Bug 1883457 - Part 1: Disable jit compilation within the parent process on iOS, r=jandem

This adds a pref to disable jit compilation by calling JS::DisableJitBackend in
the parent process. This will be used on iOS, where the jit entitlements are
only available for sandboxed content processes.

Differential Revision: https://phabricator.services.mozilla.com/D203498
This commit is contained in:
Nika Layzell 2024-03-22 19:47:48 +00:00
Родитель 75dedf9d29
Коммит a8741bf73e
2 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -7960,6 +7960,12 @@
value: false
mirror: always
# Whether to disable the jit within the main process
- name: javascript.options.main_process_disable_jit
type: bool
value: @IS_IOS@
mirror: always
#---------------------------------------------------------------------------
# Prefs starting with "layers."
#---------------------------------------------------------------------------

Просмотреть файл

@ -233,6 +233,11 @@ static void InitializeJS() {
JS::SetAVXEnabled(mozilla::StaticPrefs::javascript_options_wasm_simd_avx());
#endif
if (XRE_IsParentProcess() &&
mozilla::StaticPrefs::javascript_options_main_process_disable_jit()) {
JS::DisableJitBackend();
}
// Set all JS::Prefs.
SET_JS_PREFS_FROM_BROWSER_PREFS;