Bug 1564017 part 6 - Add prefs to about:config. r=tcampbell

I used 'blinterp' to match the shell flags.

Depends on D37211

Differential Revision: https://phabricator.services.mozilla.com/D37213

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan de Mooij 2019-07-08 15:50:22 +00:00
Родитель 1dfc02a62d
Коммит e78f06cdc7
2 изменённых файлов: 16 добавлений и 3 удалений

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

@ -778,6 +778,7 @@ void xpc::SetPrefableRealmOptions(JS::RealmOptions& options) {
static void ReloadPrefsCallback(const char* pref, XPCJSContext* xpccx) {
JSContext* cx = xpccx->Context();
bool useBaselineInterp = Preferences::GetBool(JS_OPTIONS_DOT_STR "blinterp");
bool useBaseline = Preferences::GetBool(JS_OPTIONS_DOT_STR "baselinejit");
bool useIon = Preferences::GetBool(JS_OPTIONS_DOT_STR "ion");
bool useAsmJS = Preferences::GetBool(JS_OPTIONS_DOT_STR "asmjs");
@ -811,6 +812,8 @@ static void ReloadPrefsCallback(const char* pref, XPCJSContext* xpccx) {
Preferences::GetBool(JS_OPTIONS_DOT_STR "jit.full_debug_checks");
#endif
int32_t baselineInterpThreshold =
Preferences::GetInt(JS_OPTIONS_DOT_STR "blinterp.threshold", -1);
int32_t baselineThreshold =
Preferences::GetInt(JS_OPTIONS_DOT_STR "baselinejit.threshold", -1);
int32_t normalIonThreshold =
@ -907,9 +910,16 @@ static void ReloadPrefsCallback(const char* pref, XPCJSContext* xpccx) {
xr->GetInSafeMode(&safeMode);
if (safeMode) {
JS::ContextOptionsRef(cx).disableOptionsForSafeMode();
useBaselineInterp = false;
}
}
JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_BASELINE_INTERPRETER_ENABLE,
useBaselineInterp);
JS_SetGlobalJitCompilerOption(
cx, JSJITCOMPILER_BASELINE_INTERPRETER_WARMUP_TRIGGER,
baselineInterpThreshold);
JS_SetParallelParsingEnabled(cx, parallelParsing);
JS_SetOffthreadIonCompilationEnabled(cx, offthreadIonCompilation);
JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_BASELINE_WARMUP_TRIGGER,

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

@ -1274,14 +1274,17 @@ pref("javascript.options.strict", false);
pref("javascript.options.strict.debug", false);
#endif
pref("javascript.options.unboxed_objects", false);
pref("javascript.options.blinterp", false);
// Duplicated in JitOptions - ensure both match.
pref("javascript.options.blinterp.threshold", 10);
pref("javascript.options.baselinejit", true);
//Duplicated in JitOptions - ensure both match.
// Duplicated in JitOptions - ensure both match.
pref("javascript.options.baselinejit.threshold", 10);
pref("javascript.options.ion", true);
//Duplicated in JitOptions - ensure both match.
// Duplicated in JitOptions - ensure both match.
pref("javascript.options.ion.threshold", 1000);
pref("javascript.options.ion.full.threshold", 100000);
//Duplicated in JitOptions - ensure both match.
// Duplicated in JitOptions - ensure both match.
pref("javascript.options.ion.frequent_bailout_threshold", 10);
pref("javascript.options.asmjs", true);
pref("javascript.options.wasm", true);