Bug 1402270 - Sanitizer and BrowsingData should delete QuotaManager storages using the origin directly and not the origin as pattern, r=janv
authorAndrea Marchesini <amarchesini@mozilla.com>
Fri, 22 Sep 2017 11:52:48 +0200
changeset 669138 81ab59f300ac4a54f6cb4fc78052c3a625675d51
parent 669137 2b587956d915ec57422210115a74de7ab7727e94
child 669139 aba0a23d94341acf31fc97ecc11955b5fad612fa
push id81223
push usergpascutto@mozilla.com
push dateFri, 22 Sep 2017 15:21:17 +0000
reviewersjanv
bugs1402270
milestone58.0a1
Bug 1402270 - Sanitizer and BrowsingData should delete QuotaManager storages using the origin directly and not the origin as pattern, r=janv
browser/base/content/sanitize.js
browser/components/extensions/ext-browsingData.js
--- a/browser/base/content/sanitize.js
+++ b/browser/base/content/sanitize.js
@@ -308,17 +308,17 @@ Sanitizer.prototype = {
         let promises = [];
         await new Promise(resolve => {
           quotaManagerService.getUsage(request => {
             for (let item of request.result) {
               let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(item.origin);
               let uri = principal.URI;
               if (uri.scheme == "http" || uri.scheme == "https" || uri.scheme == "file") {
                 promises.push(new Promise(r => {
-                  let req = quotaManagerService.clearStoragesForPrincipal(principal, null, true);
+                  let req = quotaManagerService.clearStoragesForPrincipal(principal, null, false);
                   req.callback = () => { r(); };
                 }));
               }
             }
             resolve();
           });
         });
 
--- a/browser/components/extensions/ext-browsingData.js
+++ b/browser/components/extensions/ext-browsingData.js
@@ -88,17 +88,17 @@ const clearIndexedDB = async function(op
 
   await new Promise(resolve => {
     quotaManagerService.getUsage(request => {
       for (let item of request.result) {
         let principal = Services.scriptSecurityManager.createCodebasePrincipalFromOrigin(item.origin);
         let uri = principal.URI;
         if (uri.scheme == "http" || uri.scheme == "https" || uri.scheme == "file") {
           promises.push(new Promise(r => {
-            let req = quotaManagerService.clearStoragesForPrincipal(principal, null, true);
+            let req = quotaManagerService.clearStoragesForPrincipal(principal, null, false);
             req.callback = () => { r(); };
           }));
         }
       }
 
       resolve();
     });
   });