mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Backout 22f9cf3cc575 (bug 820463) for breaking marionette on a CLOSED TREE
This commit is contained in:
parent
13a8878f0f
commit
22c3980e58
@ -8,6 +8,7 @@ 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';
|
||||
|
||||
@ -56,23 +57,30 @@ 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");
|
||||
this.logger.info("marionette enabled, loadearly: " + loadearly);
|
||||
|
||||
//add observers
|
||||
observerService.addObserver(this, "final-ui-startup", false);
|
||||
if (loadearly) {
|
||||
observerService.addObserver(this, "final-ui-startup", false);
|
||||
}
|
||||
else {
|
||||
observerService.addObserver(this, "system-message-listener-ready", false);
|
||||
}
|
||||
observerService.addObserver(this, "xpcom-shutdown", false);
|
||||
}
|
||||
else {
|
||||
this.logger.info("marionette not enabled");
|
||||
}
|
||||
break;
|
||||
case "final-ui-startup":
|
||||
this.logger.info("marionette initializing at " + aTopic);
|
||||
observerService.removeObserver(this, aTopic);
|
||||
case "system-message-listener-ready":
|
||||
this.logger.info("marionette initializing at system-message-listener-ready");
|
||||
observerService.removeObserver(this, "system-message-listener-ready");
|
||||
|
||||
try {
|
||||
this.original_forcelocal = Services.prefs.getBoolPref(DEBUGGER_FORCELOCAL_PREF);
|
||||
|
Loading…
Reference in New Issue
Block a user