Bug 1603358 - Enable Eager evaluation in all channels. r=Honza. a=jcristau
authorNicolas Chevobbe <nchevobbe@mozilla.com>
Tue, 17 Mar 2020 11:58:06 +0000
changeset 580601 c20ad7990dc70be13ae7774878a70d77b26cb93f
parent 580600 90ecb6a88b0f85d5a91aa5e9a3795dbdc2e4d36e
child 580602 9c3293d6609fb642d7a557d04c5944e57669d17b
push id12886
push usercsabou@mozilla.com
push dateFri, 20 Mar 2020 16:57:11 +0000
treeherdermozilla-beta@d4c07620faeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza, jcristau
bugs1603358
milestone75.0
Bug 1603358 - Enable Eager evaluation in all channels. r=Honza. a=jcristau Differential Revision: https://phabricator.services.mozilla.com/D67116
browser/app/profile/firefox.js
devtools/client/debugger/test/mochitest/browser_dbg-eager-eval-skip-pause.js
devtools/client/webconsole/test/browser/browser_console_eager_eval.js
devtools/client/webconsole/test/browser/browser_jsterm_eager_evaluation.js
devtools/client/webconsole/test/browser/browser_jsterm_eager_evaluation_element_highlight.js
devtools/client/webconsole/test/browser/browser_jsterm_eager_evaluation_in_debugger_stackframe.js
devtools/client/webconsole/test/browser/browser_jsterm_eager_evaluation_warnings.js
devtools/client/webconsole/test/browser/browser_webconsole_in_line_layout.js
devtools/client/webconsole/test/node/mocha-test-setup.js
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -2128,21 +2128,17 @@ pref("devtools.webconsole.filter.net", f
 pref("devtools.webconsole.filter.netxhr", false);
 
 // Webconsole autocomplete preference
 pref("devtools.webconsole.input.autocomplete",true);
 pref("devtools.webconsole.input.context", false);
 
 // Set to true to eagerly show the results of webconsole terminal evaluations
 // when they don't have side effects.
-#if defined(NIGHTLY_BUILD) || defined(MOZ_DEV_EDITION)
-  pref("devtools.webconsole.input.eagerEvaluation", true);
-#else
-  pref("devtools.webconsole.input.eagerEvaluation", false);
-#endif
+pref("devtools.webconsole.input.eagerEvaluation", true);
 
 // Browser console filters
 pref("devtools.browserconsole.filter.error", true);
 pref("devtools.browserconsole.filter.warn", true);
 pref("devtools.browserconsole.filter.info", true);
 pref("devtools.browserconsole.filter.log", true);
 pref("devtools.browserconsole.filter.debug", true);
 pref("devtools.browserconsole.filter.css", false);
--- a/devtools/client/debugger/test/mochitest/browser_dbg-eager-eval-skip-pause.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg-eager-eval-skip-pause.js
@@ -2,18 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 // Test that eager evaluation skips breakpoints and debugger statements
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.input.eagerEvaluation", true);
-
   const dbg = await initDebugger("doc-strict.html");
   const { hud } = await getDebuggerSplitConsole(dbg);
 
   const target = await TargetFactory.forTab(gBrowser.selectedTab);
   const toolbox = gDevTools.getToolbox(target);
 
   await addBreakpoint(dbg, "doc-strict.html", 15);
   setInputValue(hud, "strict()");
--- a/devtools/client/webconsole/test/browser/browser_console_eager_eval.js
+++ b/devtools/client/webconsole/test/browser/browser_console_eager_eval.js
@@ -2,20 +2,16 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 // Check evaluating eager-evaluation values.
 const TEST_URI = "data:text/html;charset=utf8,";
 
-add_task(async function setup() {
-  await pushPref("devtools.webconsole.input.eagerEvaluation", true);
-});
-
 add_task(async function() {
   await addTab(TEST_URI);
 
   info("Open the Browser Console");
   const hud = await BrowserConsoleManager.toggleBrowserConsole();
 
   await executeNonDebuggeeSideeffect(hud);
 });
--- a/devtools/client/webconsole/test/browser/browser_jsterm_eager_evaluation.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_eager_evaluation.js
@@ -18,17 +18,16 @@ var obj = {propA: "A", propB: "B"};
 `;
 
 const EAGER_EVALUATION_PREF = "devtools.webconsole.input.eagerEvaluation";
 
 // Basic testing of eager evaluation functionality. Expressions which can be
 // eagerly evaluated should show their results, and expressions with side
 // effects should not perform those side effects.
 add_task(async function() {
-  await pushPref(EAGER_EVALUATION_PREF, true);
   const hud = await openNewTabAndConsole(TEST_URI);
 
   // Do an evaluation to populate $_
   await executeAndWaitForMessage(
     hud,
     "'result: ' + (x + y)",
     "result: 7",
     ".result"
@@ -223,17 +222,16 @@ add_task(async function() {
   await waitForNoEagerEvaluationResult(hud);
 
   // go back to inline layout.
   await toggleLayout(hud);
 });
 
 // Test that the currently selected autocomplete result is eagerly evaluated.
 add_task(async function() {
-  await pushPref(EAGER_EVALUATION_PREF, true);
   const hud = await openNewTabAndConsole(TEST_URI);
   const { jsterm } = hud;
 
   const { autocompletePopup: popup } = jsterm;
 
   ok(!popup.isOpen, "popup is not open");
   let onPopupOpen = popup.once("popup-opened");
   EventUtils.sendString("zzy");
@@ -276,22 +274,16 @@ add_task(async function() {
 
   onPopupClose = popup.once("popup-closed");
   EventUtils.sendString(" ");
   await waitForEagerEvaluationResult(hud, `3`);
 });
 
 // Test that the setting works as expected.
 add_task(async function() {
-  // Settings is only enabled on Nightly at the moment.
-  if (!AppConstants.NIGHTLY_BUILD) {
-    ok(true);
-    return;
-  }
-
   // start with the pref off.
   await pushPref(EAGER_EVALUATION_PREF, false);
   const hud = await openNewTabAndConsole(TEST_URI);
 
   info("Check that the setting is disabled");
   checkConsoleSettingState(
     hud,
     ".webconsole-console-settings-menu-item-eager-evaluation",
--- a/devtools/client/webconsole/test/browser/browser_jsterm_eager_evaluation_element_highlight.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_eager_evaluation_element_highlight.js
@@ -12,17 +12,16 @@ const TEST_URI = `data:text/html;charset
     a: document.querySelector("h1"),
     b: document.querySelector("div"),
     c: document.createElement("hr")
   }));
 </script>`;
 
 // Test that when the eager evaluation result is an element, it gets highlighted.
 add_task(async function() {
-  await pushPref("devtools.webconsole.input.eagerEvaluation", true);
   const hud = await openNewTabAndConsole(TEST_URI);
   const { jsterm, toolbox } = hud;
   const { autocompletePopup } = jsterm;
 
   await registerTestActor(toolbox.target.client);
   const testActor = await getTestActor(toolbox);
   const inspectorFront = await toolbox.target.getFront("inspector");
 
--- a/devtools/client/webconsole/test/browser/browser_jsterm_eager_evaluation_in_debugger_stackframe.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_eager_evaluation_in_debugger_stackframe.js
@@ -13,20 +13,17 @@ var x = "global";
 function pauseInDebugger(param) {
   let x = "local";
   debugger;
 }
 
 </script>
 `;
 
-const EAGER_EVALUATION_PREF = "devtools.webconsole.input.eagerEvaluation";
-
 add_task(async function() {
-  await pushPref(EAGER_EVALUATION_PREF, true);
   const hud = await openNewTabAndConsole(TEST_URI);
 
   const target = await TargetFactory.forTab(gBrowser.selectedTab);
   const toolbox = gDevTools.getToolbox(target);
 
   setInputValue(hud, "x");
   await waitForEagerEvaluationResult(hud, `"global"`);
 
--- a/devtools/client/webconsole/test/browser/browser_jsterm_eager_evaluation_warnings.js
+++ b/devtools/client/webconsole/test/browser/browser_jsterm_eager_evaluation_warnings.js
@@ -1,17 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 "use strict";
 
 const TEST_URI = `data:text/html;charset=utf-8,Test that eager evaluation can't log warnings in the output`;
 add_task(async function() {
-  await pushPref("devtools.webconsole.input.eagerEvaluation", true);
   const hud = await openNewTabAndConsole(TEST_URI);
 
   setInputValue(hud, `document.getElementById("")`);
   await waitForEagerEvaluationResult(hud, "null");
 
   info("Wait for a bit so a warning message could be displayed");
   await wait(2000);
   is(
--- a/devtools/client/webconsole/test/browser/browser_webconsole_in_line_layout.js
+++ b/devtools/client/webconsole/test/browser/browser_webconsole_in_line_layout.js
@@ -6,17 +6,16 @@
 // Test that the in-line layout works as expected
 
 const TEST_URI =
   "data:text/html,<meta charset=utf8>Test in-line console layout";
 
 const MINIMUM_MESSAGE_HEIGHT = 20;
 
 add_task(async function() {
-  await pushPref("devtools.webconsole.input.eagerEvaluation", true);
   const hud = await openNewTabAndConsole(TEST_URI);
   const { ui } = hud;
   const { document } = ui;
   const appNode = document.querySelector(".webconsole-app");
   const filterBarNode = appNode.querySelector(
     ".webconsole-filteringbar-wrapper"
   );
   const outputNode = appNode.querySelector(".webconsole-output");
--- a/devtools/client/webconsole/test/node/mocha-test-setup.js
+++ b/devtools/client/webconsole/test/node/mocha-test-setup.js
@@ -22,17 +22,17 @@ pref("devtools.webconsole.filter.net", f
 pref("devtools.webconsole.filter.netxhr", false);
 pref("devtools.webconsole.inputHistoryCount", 300);
 pref("devtools.webconsole.persistlog", false);
 pref("devtools.webconsole.timestampMessages", false);
 pref("devtools.webconsole.sidebarToggle", true);
 pref("devtools.webconsole.groupWarningMessages", false);
 pref("devtools.webconsole.input.editor", false);
 pref("devtools.webconsole.input.autocomplete", true);
-pref("devtools.webconsole.input.eagerEvaluation", false);
+pref("devtools.webconsole.input.eagerEvaluation", true);
 pref("devtools.browserconsole.contentMessages", true);
 pref("devtools.webconsole.input.editorWidth", 800);
 pref("devtools.webconsole.input.editorOnboarding", true);
 pref("devtools.webconsole.input.context", false);
 
 global.loader = {
   lazyServiceGetter: () => {},
   lazyGetter: (context, name, fn) => {