fix memory leak related to scriptlet injection through StreamFilter

This commit is contained in:
Raymond Hill 2018-02-20 07:35:03 -05:00
parent aadcfcdaf3
commit c5cbf5db47
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,7 @@
"manifest_version": 2, "manifest_version": 2,
"name": "uBlock Origin", "name": "uBlock Origin",
"version": "1.15.6", "version": "1.15.8",
"commands": { "commands": {
"launch-element-zapper": { "launch-element-zapper": {

View File

@ -707,7 +707,10 @@ var filterDocument = (function() {
// confirmed, there is nothing which can be done uBO-side to reduce // confirmed, there is nothing which can be done uBO-side to reduce
// overhead. // overhead.
if ( filterer.buffer === null ) { 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); filterer.buffer = new Uint8Array(ev.data);
return; return;
} }