Bug 1896292 - Use toolkits OfflineAppCacheHelper in sanitizer. r=IanN
It was moved into toolkit from browser in Bug 1415342
so we can delete our copy.
This commit is contained in:
Родитель
fc74b62444
Коммит
cf67665768
|
@ -15,6 +15,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
FormHistory: "resource://gre/modules/FormHistory.jsm",
|
||||
PlacesUtils: "resource://gre/modules/PlacesUtils.jsm",
|
||||
setTimeout: "resource://gre/modules/Timer.jsm",
|
||||
OfflineAppCacheHelper: "resource://gre/modules/offlineAppCache.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "serviceWorkerManager",
|
||||
|
@ -371,8 +372,6 @@ var Sanitizer = {
|
|||
|
||||
offlineApps: {
|
||||
async clear(range) {
|
||||
// AppCache
|
||||
ChromeUtils.import("resource:///modules/OfflineAppCacheHelper.jsm");
|
||||
// This doesn't wait for the cleanup to be complete.
|
||||
OfflineAppCacheHelper.clear();
|
||||
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
var EXPORTED_SYMBOLS = ["OfflineAppCacheHelper"];
|
||||
|
||||
var OfflineAppCacheHelper = {
|
||||
clear() {
|
||||
var appCacheStorage = Services.cache2.appCacheStorage(Services.loadContextInfo.default, null);
|
||||
try {
|
||||
appCacheStorage.asyncEvictStorage(null);
|
||||
} catch (er) {}
|
||||
}
|
||||
};
|
|
@ -7,7 +7,6 @@ XPCSHELL_TESTS_MANIFESTS += ["test/unit/xpcshell.ini"]
|
|||
|
||||
EXTRA_JS_MODULES += [
|
||||
"Feeds.jsm",
|
||||
"OfflineAppCacheHelper.jsm",
|
||||
"OpenInTabsUtils.jsm",
|
||||
"PermissionUI.jsm",
|
||||
"RecentWindow.jsm",
|
||||
|
|
Загрузка…
Ссылка в новой задаче