Bug 1351465 - shield-recipe-client: Unconditionally set up logging in bootstrap r?Gijs
MozReview-Commit-ID: 5W7UdpsLyYd
--- a/browser/extensions/shield-recipe-client/bootstrap.js
+++ b/browser/extensions/shield-recipe-client/bootstrap.js
@@ -52,27 +52,27 @@ this.install = function() {
shouldRun = false;
}
}
};
this.startup = function() {
setDefaultPrefs();
- if (!shouldRun) {
- return;
- }
-
// Setup logging and listen for changes to logging prefs
LogManager.configure(Services.prefs.getIntPref(PREF_LOGGING_LEVEL));
log = LogManager.getLogger("bootstrap");
Preferences.observe(PREF_LOGGING_LEVEL, LogManager.configure);
CleanupManager.addCleanupHandler(
() => Preferences.ignore(PREF_LOGGING_LEVEL, LogManager.configure));
+ if (!shouldRun) {
+ return;
+ }
+
RecipeRunner.init();
};
this.shutdown = function(data, reason) {
CleanupManager.cleanup();
if (reason === REASONS.ADDON_DISABLE || reason === REASONS.ADDON_UNINSTALL) {
Services.prefs.setBoolPref(PREF_SELF_SUPPORT_ENABLED, true);