diff --git a/toolkit/components/contextualidentity/ContextualIdentityService.jsm b/toolkit/components/contextualidentity/ContextualIdentityService.jsm index 59b8c5acd414..8a2c1871d538 100644 --- a/toolkit/components/contextualidentity/ContextualIdentityService.jsm +++ b/toolkit/components/contextualidentity/ContextualIdentityService.jsm @@ -41,7 +41,6 @@ this.ContextualIdentityService = { color: "#00a7e0", label: "userContextPersonal.label", accessKey: "userContextPersonal.accesskey", - alreadyOpened: false, telemetryId: 1, }, { userContextId: 2, @@ -50,7 +49,6 @@ this.ContextualIdentityService = { color: "#f89c24", label: "userContextWork.label", accessKey: "userContextWork.accesskey", - alreadyOpened: false, telemetryId: 2, }, { userContextId: 3, @@ -59,7 +57,6 @@ this.ContextualIdentityService = { color: "#7dc14c", label: "userContextBanking.label", accessKey: "userContextBanking.accesskey", - alreadyOpened: false, telemetryId: 3, }, { userContextId: 4, @@ -68,7 +65,6 @@ this.ContextualIdentityService = { color: "#ee5195", label: "userContextShopping.label", accessKey: "userContextShopping.accesskey", - alreadyOpened: false, telemetryId: 4, }, { userContextId: Math.pow(2, 31) - 1, @@ -76,11 +72,11 @@ this.ContextualIdentityService = { icon: "", color: "", label: "userContextIdInternal.thumbnail", - accessKey: "", - alreadyOpened: false }, + accessKey: "" }, ], _identities: null, + _openedIdentities: new Set(), _path: null, _dataReady: false, @@ -219,8 +215,8 @@ this.ContextualIdentityService = { return; } - if (!identity.alreadyOpened) { - identity.alreadyOpened = true; + if (this._openedIdentities.has(userContextId)) { + this._openedIdentities.add(userContextId); Services.telemetry.getHistogramById("UNIQUE_CONTAINERS_OPENED").add(1); }