Close the opened tabs when a container is deleted

This commit is contained in:
baku 2017-01-18 18:07:33 +01:00
parent 4331a2612c
commit 702d5aba4c

View file

@ -454,6 +454,13 @@ const ContainerService = {
if (!("userContextId" in args)) {
return Promise.reject("removeIdentity must be called with userContextId argument.");
}
for (let tab of tabs) { // eslint-disable-line prefer-const
if (args.userContextId === this._getUserContextIdFromTab(tab)) {
tab.close();
}
}
return Promise.resolve(ContextualIdentityService.remove(args.userContextId));
},