Bug 820463 - Revert early-loading changes, r=mdas
☠☠ backed out by b0a563745fb6 ☠ ☠
authorJonathan Griffin <jgriffin@mozilla.com>
Mon, 17 Dec 2012 15:18:58 -0800
changeset 125561 22f9cf3cc575
parent 125560 be10b073bb11
child 125562 7286dac15291
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
bugs820463
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 820463 - Revert early-loading changes, r=mdas
testing/marionette/components/marionettecomponent.js
--- a/testing/marionette/components/marionettecomponent.js
+++ b/testing/marionette/components/marionettecomponent.js
@@ -3,17 +3,16 @@
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 const {Constructor: CC, classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 const MARIONETTE_CONTRACTID = "@mozilla.org/marionette;1";
 const MARIONETTE_CID = Components.ID("{786a1369-dca5-4adc-8486-33d23c88010a}");
 const DEBUGGER_ENABLED_PREF = 'devtools.debugger.remote-enabled';
 const MARIONETTE_ENABLED_PREF = 'marionette.defaultPrefs.enabled';
-const MARIONETTE_LOADEARLY_PREF = 'marionette.loadearly';
 const DEBUGGER_FORCELOCAL_PREF = 'devtools.debugger.force-local';
 const MARIONETTE_FORCELOCAL_PREF = 'marionette.force-local';
 
 const ServerSocket = CC("@mozilla.org/network/server-socket;1",
                         "nsIServerSocket",
                         "init");
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
@@ -52,40 +51,33 @@ MarionetteComponent.prototype = {
   },
 
   observe: function mc_observe(aSubject, aTopic, aData) {
     let observerService = Services.obs;
     switch (aTopic) {
       case "profile-after-change":
         let appName = Services.appinfo.name;
         let enabled = false;
-        let loadearly = appName == 'B2G' ? false : true;
         try {
           enabled = Services.prefs.getBoolPref(MARIONETTE_ENABLED_PREF);
-          loadearly = Services.prefs.getBoolPref(MARIONETTE_LOADEARLY_PREF);
         } catch(e) {}
         if (enabled) {
-          this.logger.info("marionette enabled, loadearly: " + loadearly);
+          this.logger.info("marionette enabled");
 
           //add observers
-          if (loadearly) {
-            observerService.addObserver(this, "final-ui-startup", false);
-          }
-          else {
-            observerService.addObserver(this, "system-message-listener-ready", false);
-          }
+          observerService.addObserver(this, "final-ui-startup", false);
           observerService.addObserver(this, "xpcom-shutdown", false);
         }
         else {
           this.logger.info("marionette not enabled");
         }
         break;
-      case "system-message-listener-ready":
-        this.logger.info("marionette initializing at system-message-listener-ready");
-        observerService.removeObserver(this, "system-message-listener-ready");
+      case "final-ui-startup":
+        this.logger.info("marionette initializing at " + aTopic);
+        observerService.removeObserver(this, aTopic);
 
         try {
           this.original_forcelocal = Services.prefs.getBoolPref(DEBUGGER_FORCELOCAL_PREF);
         }
         catch(e) {}
 
         let marionette_forcelocal = false;
         try {