From c5cbf5db471e16916bf080a76314f2f9f04ed9bc Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 20 Feb 2018 07:35:03 -0500 Subject: [PATCH] fix memory leak related to scriptlet injection through StreamFilter --- platform/chromium/manifest.json | 2 +- src/js/traffic.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/chromium/manifest.json b/platform/chromium/manifest.json index c84d5707e..b43a9e5b7 100644 --- a/platform/chromium/manifest.json +++ b/platform/chromium/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "uBlock Origin", - "version": "1.15.6", + "version": "1.15.8", "commands": { "launch-element-zapper": { diff --git a/src/js/traffic.js b/src/js/traffic.js index 42900ef47..2ed04abad 100644 --- a/src/js/traffic.js +++ b/src/js/traffic.js @@ -707,7 +707,10 @@ var filterDocument = (function() { // confirmed, there is nothing which can be done uBO-side to reduce // overhead. if ( filterer.buffer === null ) { - if ( streamJobDone(filterer, ev.data) ) { return; } + if ( streamJobDone(filterer, ev.data) ) { + filterers.delete(this); + return; + } filterer.buffer = new Uint8Array(ev.data); return; }