1
0
Fork 0
firefox/dom/serviceworkers/test/file_js_cache_cleanup.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

16 lines
399 B
JavaScript

"use strict";
const { XPCOMUtils } = ChromeUtils.importESModule(
"resource://gre/modules/XPCOMUtils.sys.mjs"
);
function clearCache() {
const cacheStorageSrv = Cc[
"@mozilla.org/netwerk/cache-storage-service;1"
].getService(Ci.nsICacheStorageService);
cacheStorageSrv.clear();
}
addMessageListener("teardown", function () {
clearCache();
sendAsyncMessage("teardown-complete");
});