From a4e61b51cd5c081204f7cf66522dc940501bf9e1 Mon Sep 17 00:00:00 2001 From: gorhill Date: Wed, 27 Sep 2017 15:29:57 -0400 Subject: [PATCH] further fix #3006: see https://github.com/gorhill/uBlock/issues/3006#issuecomment-332597677 --- platform/chromium/vapi-background.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index c60462bfd..5fcb58c65 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -1152,7 +1152,7 @@ vAPI.cloud = (function() { // actual data, but all of this is provided for free by browser vendors, // so we need to accept and deal with these limitations. var initialize = function() { - var ratio = vAPI.webextFlavor.startsWith('Mozilla-Firefox-') ? 0.5 : 0.75; + var ratio = vAPI.webextFlavor.startsWith('Mozilla-Firefox-') ? 0.6 : 0.75; maxChunkSize = Math.floor(maxChunkSize * ratio); initialize = function(){}; }; @@ -1240,6 +1240,9 @@ vAPI.cloud = (function() { var errorStr; if ( chrome.runtime.lastError ) { errorStr = chrome.runtime.lastError.message; + // https://github.com/gorhill/uBlock/issues/3006#issuecomment-332597677 + // - Delete all that was pushed in case of failure. + chunkCount = 0; } callback(errorStr);