Bug 820463 - Revert early-loading changes, r=mdas

This commit is contained in:
Jonathan Griffin 2012-12-17 15:18:58 -08:00
parent f665c1eb63
commit 8db12ba218

View File

@ -8,7 +8,6 @@ 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';
@ -57,30 +56,23 @@ MarionetteComponent.prototype = {
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);