Bug 1590241 - Enable WebReplay appears in DevEdition. r=bhackett

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jason Laster 2019-10-23 00:51:00 +00:00
parent 659e2d2335
commit ff017ca271
3 changed files with 14 additions and 10 deletions

View File

@ -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,
},

View File

@ -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

View File

@ -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);