Bug 1619311 - Synchronize the webconsole.input.context preference when the Browser Toolbox starts. r=jdescottes

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Alexandre Poirot 2020-03-04 15:04:10 +00:00
parent bf48011278
commit 3369493912
2 changed files with 11 additions and 0 deletions

View File

@ -254,10 +254,16 @@ BrowserToolboxLauncher.prototype = {
"devtools.browsertoolbox.fission",
false
);
const isInputContextEnabled = Services.prefs.getBoolPref(
"devtools.webconsole.input.context",
false
);
const environment = {
// Will be read by the Browser Toolbox Firefox instance to update the
// devtools.browsertoolbox.fission pref on the Browser Toolbox profile.
MOZ_BROWSER_TOOLBOX_FISSION_PREF: isBrowserToolboxFission ? "1" : "0",
// Similar, but for the WebConsole input context dropdown.
MOZ_BROWSER_TOOLBOX_INPUT_CONTEXT: isInputContextEnabled ? "1" : "0",
// Disable safe mode for the new process in case this was opened via the
// keyboard shortcut.
MOZ_DISABLE_SAFE_MODE_KEY: "1",

View File

@ -83,6 +83,11 @@ var connect = async function() {
"devtools.browsertoolbox.fission",
env.get("MOZ_BROWSER_TOOLBOX_FISSION_PREF") === "1"
);
// Similar, but for the WebConsole input context dropdown.
Services.prefs.setBoolPref(
"devtools.webconsole.input.context",
env.get("MOZ_BROWSER_TOOLBOX_INPUT_CONTEXT") === "1"
);
const port = env.get("MOZ_BROWSER_TOOLBOX_PORT");