# HG changeset patch # User Jan de Mooij # Date 1518191257 -3600 # Node ID 9848ae936a3d35820e1e9a6b69eeb856aa53aa78 # Parent 90b6defa17e6ce5ddcc8b1c8e2b17c30a301d2b9 Bug 1434230 part 4 - Enable Spectre string mitigations by default. r=luke diff --git a/js/src/jit/JitOptions.cpp b/js/src/jit/JitOptions.cpp --- a/js/src/jit/JitOptions.cpp +++ b/js/src/jit/JitOptions.cpp @@ -228,17 +228,17 @@ DefaultJitOptions::DefaultJitOptions() const char* forcedRegisterAllocatorEnv = "JIT_OPTION_forcedRegisterAllocator"; if (const char* env = getenv(forcedRegisterAllocatorEnv)) { forcedRegisterAllocator = LookupRegisterAllocator(env); if (!forcedRegisterAllocator.isSome()) Warn(forcedRegisterAllocatorEnv, env); } SET_DEFAULT(spectreIndexMasking, true); - SET_DEFAULT(spectreStringMitigations, false); + SET_DEFAULT(spectreStringMitigations, true); // Toggles whether unboxed plain objects can be created by the VM. SET_DEFAULT(disableUnboxedObjects, false); // Test whether Atomics are allowed in asm.js code. SET_DEFAULT(asmJSAtomicsEnable, false); // Toggles the optimization whereby offsets are folded into loads and not diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -1567,17 +1567,17 @@ pref("javascript.options.showInConsole", pref("javascript.options.shared_memory", false); pref("javascript.options.throw_on_debuggee_would_run", false); pref("javascript.options.dump_stack_on_debuggee_would_run", false); // Spectre security vulnerability mitigations. pref("javascript.options.spectre.index_masking", true); -pref("javascript.options.spectre.string_mitigations", false); +pref("javascript.options.spectre.string_mitigations", true); // Streams API pref("javascript.options.streams", false); // advanced prefs pref("advanced.mailftp", false); pref("image.animation_mode", "normal");