diff --git a/devtools/client/definitions.js b/devtools/client/definitions.js index 9e663dad8e1e..c2f538cec886 100644 --- a/devtools/client/definitions.js +++ b/devtools/client/definitions.js @@ -568,14 +568,20 @@ exports.ToolboxButtons = [ { id: "command-button-replay", description: l10n("toolbox.buttons.replay"), - isTargetSupported: target => !target.canRewind && target.isLocalTab, + isTargetSupported: target => + Services.prefs.getBoolPref("devtools.recordreplay.enabled") && + !target.canRewind && + target.isLocalTab, onClick: () => reloadAndRecordTab(), isChecked: () => false, }, { id: "command-button-stop-replay", description: l10n("toolbox.buttons.stopReplay"), - isTargetSupported: target => target.canRewind && target.isLocalTab, + isTargetSupported: target => + Services.prefs.getBoolPref("devtools.recordreplay.enabled") && + target.canRewind && + target.isLocalTab, onClick: () => reloadAndStopRecordingTab(), isChecked: () => true, }, diff --git a/devtools/client/framework/devtools-browser.js b/devtools/client/framework/devtools-browser.js index 2c0456aec3c4..331faa6a4622 100644 --- a/devtools/client/framework/devtools-browser.js +++ b/devtools/client/framework/devtools-browser.js @@ -151,14 +151,10 @@ var gDevToolsBrowser = (exports.gDevToolsBrowser = { ); // Enable record/replay menu items? - try { - const recordReplayEnabled = Services.prefs.getBoolPref( - "devtools.recordreplay.enabled" - ); - toggleMenuItem("menu_webreplay", recordReplayEnabled); - } catch (e) { - // devtools.recordreplay.enabled only exists on certain platforms. - } + const recordReplayEnabled = Services.prefs.getBoolPref( + "devtools.recordreplay.enabled" + ); + toggleMenuItem("menu_webreplay", recordReplayEnabled); // The profiler's popup is experimental. The plan is to eventually turn it on // everywhere, but while it's under active development we don't want everyone diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 563e8bd6e2f2..fd9ac943caf8 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -828,6 +828,8 @@ pref("toolkit.dump.emit", false); #if defined(XP_MACOSX) && defined(NIGHTLY_BUILD) pref("devtools.recordreplay.enabled", true); pref("devtools.recordreplay.enableRewinding", true); +#else + pref("devtools.recordreplay.enabled", false); #endif pref("devtools.recordreplay.mvp.enabled", false);