regression from cabb0d36b679: avoid counting "badfilter" entries as actual filters

This commit is contained in:
Raymond Hill 2018-10-24 20:06:27 -03:00
parent c0fc7dd869
commit 5f66f03c69
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 2 additions and 5 deletions

View File

@ -2274,17 +2274,14 @@ FilterContainer.prototype.fromCompiledContent = function(reader) {
}
}
// 1 = network filters: bad filters
// 1 = network filters: bad filter directives
// Since we are going to keep bad filter fingerprints around, we ensure
// they are "detached" from the parent string from which they are sliced.
// We keep bad filter fingerprints around to use them when user
// incrementally add filters (through "Block element" for example).
reader.select(1);
while ( reader.next() ) {
this.acceptedCount += 1;
if ( this.badFilters.has(reader.line) ) {
this.discardedCount += 1;
} else {
if ( this.badFilters.has(reader.line) === false ) {
this.badFilters.add(µb.orphanizeString(reader.line));
}
}