Bug 1344748 - Remove ENABLE_MARIONETTE check from MarionetteComponent; r=whimboo
authorAndreas Tolfsen <ato@mozilla.com>
Thu, 09 Mar 2017 17:56:46 +0000
changeset 397851 4985a0d47c7f22aaf3f96e3f89a1daaf347739fa
parent 397850 1598e2db1cf6bc8df116cff6a90ff382820801b8
child 397852 818abd440d52e010eb2ea2ec50f131da650551eb
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswhimboo
bugs1344748
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1344748 - Remove ENABLE_MARIONETTE check from MarionetteComponent; r=whimboo If ENABLE_MARIONETTE is false, the Marionette jar will not be included in the omnijar, making the check in MarionetteComponent superfluous. It also does not belong in this file: the intention of ENABLE_MARIONETTE is to disable the compilation and inclusion of Marionette altogether, not to gate whether to enable the Marionette server. The Marionette component is considered enables if the marionette.enabled/marionette.defaultPrefs.enable preference is true or --marionette is passed as a flag. This presupposes that the Marionette component is packaged. MozReview-Commit-ID: K8gam5hOvB0
testing/marionette/components/marionette.js
testing/marionette/components/moz.build
--- a/testing/marionette/components/marionette.js
+++ b/testing/marionette/components/marionette.js
@@ -46,22 +46,18 @@ const ServerSocket = CC("@mozilla.org/ne
 
 // Marionette preferences recently changed names.  This is an abstraction
 // that first looks for the new name, but falls back to using the old name
 // if the new does not exist.
 //
 // This shim can be removed when Firefox 55 ships.
 const prefs = {
   get enabled () {
-#ifdef ENABLE_MARIONETTE
     let fallback = Preferences.get("marionette.defaultPrefs.enabled", false);
     return Preferences.get("marionette.enabled", fallback);
-#else
-    return false;
-#endif
   },
 
   get port () {
     let fallback = Preferences.get("marionette.defaultPrefs.port", DEFAULT_PORT);
     return Preferences.get("marionette.port", fallback);
   },
 
   get logLevel () {
--- a/testing/marionette/components/moz.build
+++ b/testing/marionette/components/moz.build
@@ -1,9 +1,8 @@
 # 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/.
 
-EXTRA_COMPONENTS += ["marionette.manifest"]
-EXTRA_PP_COMPONENTS += ["marionette.js"]
-
-if CONFIG["ENABLE_MARIONETTE"]:
-    DEFINES["ENABLE_MARIONETTE"] = 1
+EXTRA_COMPONENTS += [
+    "marionette.js",
+    "marionette.manifest",
+]