Fix regression in the collapsing of blocked resources

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/356
This commit is contained in:
Raymond Hill 2018-12-27 10:17:08 -05:00
parent 0dde563759
commit eb1428c8bb
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 5 additions and 8 deletions

View File

@ -774,8 +774,6 @@ vAPI.domFilterer = new vAPI.DOMFilterer();
vAPI.domCollapser = (function() {
const messaging = vAPI.messaging;
const toProcess = [];
const toFilter = [];
const toCollapse = new Map();
const src1stProps = {
embed: 'src',
@ -798,6 +796,8 @@ vAPI.domCollapser = (function() {
cachedBlockedSet,
cachedBlockedSetHash,
cachedBlockedSetTimer,
toProcess = [],
toFilter = [],
netSelectorCacheCount = 0;
const cachedBlockedSetClear = function() {
@ -888,8 +888,8 @@ vAPI.domCollapser = (function() {
hash: cachedBlockedSetHash
};
messaging.send('contentscript', msg, onProcessed);
toProcess.length = 0;
toFilter.length = 0;
toProcess = [];
toFilter = [];
resquestIdGenerator += 1;
};
@ -949,10 +949,7 @@ vAPI.domCollapser = (function() {
return;
}
if ( src.startsWith('http') === false ) { return; }
toFilter[toFilter.length] = {
type: 'sub_frame',
url: iframe.src
};
toFilter.push({ type: 'sub_frame', url: iframe.src });
add(iframe);
};