Bug 1287091 - part 5 - ContextualIdentityService should dispatch 'clear-origin-data' when a container is deleted, r=Gijs
authorAndrea Marchesini <amarchesini@mozilla.com>
Mon, 25 Jul 2016 09:26:18 +0200
changeset 306366 f577fea911602ccf974bc900ca55e936a43186d2
parent 306365 11a988cd506aab15d8b3b855bf526e33f87cc75b
child 306367 5c9d37d6c9ffc0f4ed446e3fab6cfb95e04ed425
push id79848
push useramarchesini@mozilla.com
push dateMon, 25 Jul 2016 07:26:39 +0000
treeherdermozilla-inbound@f577fea91160 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1287091
milestone50.0a1
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
Bug 1287091 - part 5 - ContextualIdentityService should dispatch 'clear-origin-data' when a container is deleted, r=Gijs
toolkit/components/contextualidentity/ContextualIdentityService.jsm
--- a/toolkit/components/contextualidentity/ContextualIdentityService.jsm
+++ b/toolkit/components/contextualidentity/ContextualIdentityService.jsm
@@ -193,16 +193,19 @@ function _ContextualIdentityService(path
   },
 
   remove(userContextId) {
     let index = this._identities.findIndex(i => i.userContextId == userContextId && i.public);
     if (index == -1) {
       return false;
     }
 
+    Services.obs.notifyObservers(null, "clear-origin-data",
+                                 JSON.stringify({ userContextId }));
+
     this._identities.splice(index, 1);
     this._openedIdentities.delete(userContextId);
     this.saveSoon();
 
     return true;
   },
 
   ensureDataReady() {