Bug 1467215 - Abort initialisation on fatal error. r=maja_zf, a=test-only
authorAndreas Tolfsen <ato@sny.no>
Wed, 06 Jun 2018 18:31:28 +0100
changeset 473666 a2590a16f2d8ad4a792b358cca61bbb397cbbc94
parent 473665 7679eddb8fdbf61701a1d950e34f19564726edf1
child 473667 62eb18c6e28c354d9173d6dfdcfbf745338069a5
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf, test-only
bugs1467215
milestone61.0
Bug 1467215 - Abort initialisation on fatal error. r=maja_zf, a=test-only 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
@@ -437,16 +437,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.info(`Listening on port ${this.server.port}`);
     });
   }