Merge pull request #777 from jonathanKingston/container-removal-fixes

Handle removing containers to refresh menus and remove assignments. F…
This commit is contained in:
luke crouch
2017-08-30 15:13:03 -05:00
committed by GitHub
2 changed files with 13 additions and 7 deletions
@@ -76,6 +76,13 @@ const messageHandler = {
return response;
});
if (browser.contextualIdentities.onRemoved) {
browser.contextualIdentities.onRemoved.addListener(({contextualIdentity}) => {
const userContextId = backgroundLogic.getUserContextIdFromCookieStoreId(contextualIdentity.cookieStoreId);
backgroundLogic.deleteContainer(userContextId, true);
});
}
// Handles messages from sdk code
const port = browser.runtime.connect();
port.onMessage.addListener(m => {