Bug 1409496 - Cleaning data per domain, must delete localStorage data. r=asuth, a=lizzard
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 25 Oct 2017 19:14:34 +0200
changeset 432780 ce6aa85a6c1167f412ed202df163cd2959cc1fdb
parent 432779 7d28b5b2217d909d2ea1b820f23112531d1cdf83
child 432781 5f5a87b7958692cc9713194f1d2fea0675dd1926
push id8056
push userryanvm@gmail.com
push dateThu, 26 Oct 2017 15:24:01 +0000
treeherdermozilla-beta@5f5a87b79586 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth, lizzard
bugs1409496
milestone57.0
Bug 1409496 - Cleaning data per domain, must delete localStorage data. r=asuth, a=lizzard
browser/components/preferences/SiteDataManager.jsm
--- a/browser/components/preferences/SiteDataManager.jsm
+++ b/browser/components/preferences/SiteDataManager.jsm
@@ -212,16 +212,18 @@ this.SiteDataManager = {
         if (cookie instanceof Components.interfaces.nsICookie) {
           if (this.isPrivateCookie(cookie)) {
             continue;
           }
           Services.cookies.remove(
             cookie.host, cookie.name, cookie.path, false, cookie.originAttributes);
         }
       }
+
+      Services.obs.notifyObservers(null, "browser:purge-domain-data", principal.URI.host);
     }
   },
 
   _removeServiceWorkers(site) {
     let serviceWorkers = serviceWorkerManager.getAllRegistrations();
     for (let i = 0; i < serviceWorkers.length; i++) {
       let sw = serviceWorkers.queryElementAt(i, Ci.nsIServiceWorkerRegistrationInfo);
       for (let principal of site.principals) {