mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-21 14:47:31 +09:00
[PALEMOON] Fix Sanitize (e.g. "Offline" - "Clear Recent History" - "Offline Website Data"): Quota Manager => Quota Manager Service
Issue #57
This commit is contained in:
parent
ff21114dcf
commit
a1e92ba7ed
1 changed files with 10 additions and 4 deletions
|
|
@ -6,8 +6,9 @@ this.EXPORTED_SYMBOLS = ["QuotaManagerHelper"];
|
||||||
|
|
||||||
Components.utils.import('resource://gre/modules/Services.jsm');
|
Components.utils.import('resource://gre/modules/Services.jsm');
|
||||||
|
|
||||||
const Cc = Components.classes;
|
|
||||||
const Ci = Components.interfaces;
|
const Ci = Components.interfaces;
|
||||||
|
const Cc = Components.classes;
|
||||||
|
const Cu = Components.utils;
|
||||||
|
|
||||||
this.QuotaManagerHelper = {
|
this.QuotaManagerHelper = {
|
||||||
clear: function(isShutDown) {
|
clear: function(isShutDown) {
|
||||||
|
|
@ -34,12 +35,17 @@ this.QuotaManagerHelper = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var qm = Cc["@mozilla.org/dom/quota/manager;1"].getService(Ci.nsIQuotaManager);
|
var qm = Cc["@mozilla.org/dom/quota-manager-service;1"]
|
||||||
|
.getService(Ci.nsIQuotaManagerService);
|
||||||
for (var dom in doms) {
|
for (var dom in doms) {
|
||||||
var uri = Services.io.newURI(dom, null, null);
|
var uri = Services.io.newURI(dom, null, null);
|
||||||
qm.clearStoragesForURI(uri);
|
let principal = Services.scriptSecurityManager
|
||||||
|
.createCodebasePrincipal(uri, {});
|
||||||
|
qm.clearStoragesForPrincipal(principal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch(er) {}
|
} catch(er) {
|
||||||
|
Cu.reportError(er);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue