Bug 1001787 - Propagate changes for foreign experiment addon uninstalls so we properly save the experiments state. r=bsmedberg, a=sylvestre
authorGeorg Fritzsche <georg.fritzsche@googlemail.com>
Tue, 29 Apr 2014 13:01:27 +0200
changeset 199057 79f00862656e30cce5e101bb17cb99341969b823
parent 199056 d1710bad3170d6fe28b70a6c269ce363e11cd4fc
child 199058 4faee7717da9cf1a5ccee0554fac35b770f8e176
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg, sylvestre
bugs1001787
milestone31.0a2
Bug 1001787 - Propagate changes for foreign experiment addon uninstalls so we properly save the experiments state. r=bsmedberg, a=sylvestre
browser/experiments/Experiments.jsm
--- a/browser/experiments/Experiments.jsm
+++ b/browser/experiments/Experiments.jsm
@@ -1697,20 +1697,25 @@ Experiments.ExperimentEntry.prototype = 
     this._log.trace("stop() - id=" + this.id + ", terminationKind=" + terminationKind);
     if (!this._enabled) {
       throw new Error("Must not call stop() on an inactive experiment.");
     }
 
     this._enabled = false;
 
     let changes = yield this.reconcileAddonState();
+    this._logTermination(terminationKind, terminationReason);
+
     let now = this._policy.now();
     this._lastChangedDate = now;
     this._endDate = now;
-    this._logTermination(terminationKind, terminationReason);
+
+    if (terminationKind == TELEMETRY_LOG.TERMINATION.ADDON_UNINSTALLED) {
+      changes |= this.ADDON_CHANGE_UNINSTALL;
+    }
 
     return changes;
   }),
 
   /**
    * Reconcile the state of the add-on against what it's supposed to be.
    *
    * If we are active, ensure the add-on is enabled and up to date.