Backed out changeset 93fa501cfd3a (bug 1287091)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Sun, 24 Jul 2016 14:31:45 +0200
changeset 348558 9050273219625ef34adf0d4482bb7b623fa1438c
parent 348557 37e221f3b0df2407181771f1037aca5f193e05b5
child 348559 8b0f3616c00a252938c4f1d44b2f82aeba374810
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1287091
milestone50.0a1
backs out93fa501cfd3a0d8b8ed5960789a2197a0db59ba9
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 93fa501cfd3a (bug 1287091)
toolkit/components/contextualidentity/ContextualIdentityService.jsm
--- a/toolkit/components/contextualidentity/ContextualIdentityService.jsm
+++ b/toolkit/components/contextualidentity/ContextualIdentityService.jsm
@@ -36,52 +36,56 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 this.ContextualIdentityService = {
   _defaultIdentities: [
     { userContextId: 1,
       public: true,
       icon: "chrome://browser/skin/usercontext/personal.svg",
       color: "#00a7e0",
       label: "userContextPersonal.label",
       accessKey: "userContextPersonal.accesskey",
+      alreadyOpened: false,
       telemetryId: 1,
     },
     { userContextId: 2,
       public: true,
       icon: "chrome://browser/skin/usercontext/work.svg",
       color: "#f89c24",
       label: "userContextWork.label",
       accessKey: "userContextWork.accesskey",
+      alreadyOpened: false,
       telemetryId: 2,
     },
     { userContextId: 3,
       public: true,
       icon: "chrome://browser/skin/usercontext/banking.svg",
       color: "#7dc14c",
       label: "userContextBanking.label",
       accessKey: "userContextBanking.accesskey",
+      alreadyOpened: false,
       telemetryId: 3,
     },
     { userContextId: 4,
       public: true,
       icon: "chrome://browser/skin/usercontext/shopping.svg",
       color: "#ee5195",
       label: "userContextShopping.label",
       accessKey: "userContextShopping.accesskey",
+      alreadyOpened: false,
       telemetryId: 4,
     },
     { userContextId: Math.pow(2, 31) - 1,
       public: false,
       icon: "",
       color: "",
       label: "userContextIdInternal.thumbnail",
-      accessKey: "" },
+      accessKey: "",
+      alreadyOpened: false },
   ],
 
   _identities: null,
-  _openedIdentities: new Set(),
 
   _path: null,
   _dataReady: false,
 
   _saver: null,
 
   init() {
     this._path = OS.Path.join(OS.Constants.Path.profileDir, "containers.json");
@@ -210,18 +214,18 @@ this.ContextualIdentityService = {
   telemetry(userContextId) {
     let identity = this.getIdentityFromId(userContextId);
 
     // Let's ignore unknown identities for now.
     if (!identity || !identity.public) {
       return;
     }
 
-    if (this._openedIdentities.has(userContextId)) {
-      this._openedIdentities.add(userContextId);
+    if (!identity.alreadyOpened) {
+      identity.alreadyOpened = true;
       Services.telemetry.getHistogramById("UNIQUE_CONTAINERS_OPENED").add(1);
     }
 
     Services.telemetry.getHistogramById("TOTAL_CONTAINERS_OPENED").add(1);
 
     if (identity.telemetryId) {
       Services.telemetry.getHistogramById("CONTAINER_USED")
                         .add(identity.telemetryId);