Bug 1467215 - Abort initialisation on fatal error. r=maja_zf
authorAndreas Tolfsen <ato@sny.no>
Wed, 06 Jun 2018 18:31:28 +0100
changeset 421800 0b9c59172bc14e37aba8cca70f5fbdd30d654307
parent 421799 0943910146c42402a548e721fcf86bd4940d4f1f
child 421801 19607304a6b77cee2d44674281230ccd41763bf7
push id104125
push useraciure@mozilla.com
push dateThu, 07 Jun 2018 21:57:03 +0000
treeherdermozilla-inbound@38c222c1bf73 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1467215
milestone62.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 1467215 - Abort initialisation on fatal error. r=maja_zf When the Marionette component fails to initialise we fail to bail out. This causes Marionette to report itself as enabled through an environment variable, an observer notification, and a log message. MozReview-Commit-ID: 2nTNNP0o5dv
testing/marionette/components/marionette.js
--- a/testing/marionette/components/marionette.js
+++ b/testing/marionette/components/marionette.js
@@ -444,16 +444,17 @@ class MarionetteMainProcess {
         const {TCPListener} = ChromeUtils.import("chrome://marionette/content/server.js", {});
         let listener = new TCPListener(MarionettePrefs.port);
         listener.start();
         this.server = listener;
       } catch (e) {
         log.fatal("Remote protocol server failed to start", e);
         this.uninit();
         Services.startup.quit(Ci.nsIAppStartup.eForceQuit);
+        return;
       }
 
       env.set(ENV_ENABLED, "1");
       Services.obs.notifyObservers(this, NOTIFY_RUNNING, true);
       log.debug("Remote service is active");
     });
   }