mirror of https://github.com/gorhill/uBlock.git
code review re. #3006
This commit is contained in:
parent
6a71fc59a4
commit
4865561ca4
|
@ -1206,7 +1206,9 @@ vAPI.cloud = (function() {
|
||||||
for ( var i = start; i < n; i++ ) {
|
for ( var i = start; i < n; i++ ) {
|
||||||
keys.push(dataKey + i.toString());
|
keys.push(dataKey + i.toString());
|
||||||
}
|
}
|
||||||
|
if ( keys.length !== 0 ) {
|
||||||
chrome.storage.sync.remove(keys);
|
chrome.storage.sync.remove(keys);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var start = function(/* dataKeys */) {
|
var start = function(/* dataKeys */) {
|
||||||
|
@ -1242,8 +1244,14 @@ vAPI.cloud = (function() {
|
||||||
errorStr = chrome.runtime.lastError.message;
|
errorStr = chrome.runtime.lastError.message;
|
||||||
// https://github.com/gorhill/uBlock/issues/3006#issuecomment-332597677
|
// https://github.com/gorhill/uBlock/issues/3006#issuecomment-332597677
|
||||||
// - Delete all that was pushed in case of failure.
|
// - Delete all that was pushed in case of failure.
|
||||||
|
// - It's unknown whether such issue applies only to Firefox:
|
||||||
|
// until such cases are reported for other browsers, we will
|
||||||
|
// reset the (now corrupted) content of the cloud storage
|
||||||
|
// only on Firefox.
|
||||||
|
if ( vAPI.webextFlavor.startsWith('Mozilla-Firefox-') ) {
|
||||||
chunkCount = 0;
|
chunkCount = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
callback(errorStr);
|
callback(errorStr);
|
||||||
|
|
||||||
// Remove potentially unused trailing chunks
|
// Remove potentially unused trailing chunks
|
||||||
|
|
Loading…
Reference in New Issue