Bug 1630228 - Enable F12 for all users with selfxss pref > 0 r=Harald,nchevobbe

Depends on D71036

Differential Revision: https://phabricator.services.mozilla.com/D71037
This commit is contained in:
Julian Descottes 2020-04-29 16:17:57 +00:00
Родитель bdabf1705b
Коммит 9dd88b59f5
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -28,6 +28,7 @@ const kDebuggerPrefs = [
];
const DEVTOOLS_ENABLED_PREF = "devtools.enabled";
const DEVTOOLS_F12_DISABLED_PREF = "devtools.experiment.f12.shortcut_disabled";
const DEVTOOLS_POLICY_DISABLED_PREF = "devtools.policy.disabled";
@ -364,6 +365,13 @@ DevToolsStartup.prototype = {
// is over).
Services.prefs.setBoolPref(DEVTOOLS_ENABLED_PREF, true);
// The F12 shortcut might be disabled to avoid accidental usage.
// Users who are already considered as devtools users should not be
// impacted.
if (this.isDevToolsUser()) {
Services.prefs.setBoolPref(DEVTOOLS_F12_DISABLED_PREF, false);
}
// Store devtoolsFlag to check it later in onWindowReady.
this.devtoolsFlag = flags.devtools;