This commit is contained in:
gorhill 2015-03-27 09:50:31 -04:00
parent 475ccccf41
commit b938022d0b
2 changed files with 17 additions and 0 deletions

View File

@ -271,6 +271,10 @@ var cachedAssetsManager = (function() {
getEntries(onEntries); getEntries(onEntries);
}; };
exports.rmrf = function() {
exports.remove(/./);
};
exports.onRemovedListener = null; exports.onRemovedListener = null;
return exports; return exports;
@ -468,6 +472,9 @@ var getRepoMetadata = function(callback) {
/******************************************************************************/ /******************************************************************************/
exports.setHomeURL = function(path, homeURL) { exports.setHomeURL = function(path, homeURL) {
if ( typeof homeURL !== 'string' || homeURL === '' ) {
return;
}
homeURLs[path] = homeURL; homeURLs[path] = homeURL;
}; };
@ -1029,6 +1036,12 @@ exports.put = function(path, content, callback) {
/******************************************************************************/ /******************************************************************************/
exports.rmrf = function() {
cachedAssetsManager.rmrf();
};
/******************************************************************************/
exports.metadata = function(callback) { exports.metadata = function(callback) {
var out = {}; var out = {};

View File

@ -1058,6 +1058,10 @@ var restoreUserData = function(request) {
}, onCountdown); }, onCountdown);
}; };
// https://github.com/gorhill/uBlock/issues/1102
// Ensure all currently cached assets are flushed from storage AND memory.
µb.assets.rmrf();
// If we are going to restore all, might as well wipe out clean local // If we are going to restore all, might as well wipe out clean local
// storage // storage
µb.XAL.keyvalRemoveAll(onAllRemoved); µb.XAL.keyvalRemoveAll(onAllRemoved);