diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 0de8a4f1a..b8be140a7 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -1599,28 +1599,14 @@ vAPI.cloud = (( ) => { } bin[dataKey + chunkCount.toString()] = ''; // Sentinel - let result; - let errorStr; try { - result = await webext.storage.sync.set(bin); + await webext.storage.sync.set(bin); } catch (reason) { - errorStr = reason; - } - - // https://github.com/gorhill/uBlock/issues/3006#issuecomment-332597677 - // - 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 ( errorStr !== undefined && vAPI.webextFlavor.soup.has('firefox') ) { - chunkCount = 0; + return String(reason); } // Remove potentially unused trailing chunks deleteChunks(dataKey, chunkCount); - - return errorStr; }; const pull = async function(dataKey) { @@ -1638,7 +1624,7 @@ vAPI.cloud = (( ) => { try { bin = await webext.storage.sync.get(chunkKeys); } catch (reason) { - return reason; + return String(reason); } // Assemble chunks into a single string. diff --git a/src/cloud-ui.html b/src/cloud-ui.html index 17dc8eb44..f97a87fed 100644 --- a/src/cloud-ui.html +++ b/src/cloud-ui.html @@ -5,14 +5,16 @@