regression from cabb0d36b6: 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

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));
}
}