Bug 821833 - Don't open extra socket when marionette.force-local is true, r=mdas
authorJonathan Griffin <jgriffin@mozilla.com>
Fri, 14 Dec 2012 16:08:05 -0800
changeset 125407 88dbe374066502e824c1840f0de3353734317a34
parent 125406 6457767f52779fdb841582d2d68a0efdcd0021f7
child 125408 2e70b718903a88355c10e2dafa32ca746ba2e9fe
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmdas
bugs821833
milestone20.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 821833 - Don't open extra socket when marionette.force-local is true, r=mdas
testing/marionette/components/marionettecomponent.js
--- a/testing/marionette/components/marionettecomponent.js
+++ b/testing/marionette/components/marionettecomponent.js
@@ -89,22 +89,24 @@ MarionetteComponent.prototype = {
 
         let marionette_forcelocal = false;
         try {
           marionette_forcelocal = Services.prefs.getBoolPref(MARIONETTE_FORCELOCAL_PREF);
         }
         catch(e) {}
         Services.prefs.setBoolPref(DEBUGGER_FORCELOCAL_PREF, marionette_forcelocal);
 
-        // See bug 800138.  Because the first socket that opens with
-        // force-local=false fails, we open a dummy socket that will fail.
-        // This allows the following attempt by Marionette to open a socket
-        // to succeed.
-        let insaneSacrificialGoat = new ServerSocket(666, false, 4);
-        insaneSacrificialGoat.asyncListen(this);
+        if (!marionette_forcelocal) {
+          // See bug 800138.  Because the first socket that opens with
+          // force-local=false fails, we open a dummy socket that will fail.
+          // This allows the following attempt by Marionette to open a socket
+          // to succeed.
+          let insaneSacrificialGoat = new ServerSocket(666, false, 4);
+          insaneSacrificialGoat.asyncListen(this);
+        }
 
         this.init();
         break;
       case "final-ui-startup":
         this.logger.info("marionette initializing at final-ui-startup");
         observerService.removeObserver(this, "final-ui-startup");
         this.init();
         break;