Bug 1087110 - Don't update experiments manifests if no experiment is running. r=gfritzsche

This commit is contained in:
David Rajchenbach-Teller 2015-03-10 13:36:17 +01:00
parent 90be53c400
commit 2504927a19
2 changed files with 12 additions and 1 deletions

View File

@ -419,6 +419,14 @@ Experiments.Experiments = function (policy=new Experiments.Policy()) {
Experiments.Experiments.prototype = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsITimerCallback, Ci.nsIObserver]),
/**
* `true` if the experiments manager is currently setup (has been fully initialized
* and not uninitialized yet).
*/
get isReady() {
return !this._shutdown;
},
init: function () {
this._shutdown = false;
configureLogging();

View File

@ -56,7 +56,10 @@ ExperimentsService.prototype = {
if (OS.Constants.Path.profileDir === undefined) {
throw Error("Update timer fired before profile was initialized?");
}
Experiments.instance().updateManifest();
let instance = Experiments.instance();
if (instance.isReady) {
instance.updateManifest();
}
},
_delayedInit: function () {