gorhill 2017-03-21 08:23:21 -04:00
parent 15714ad22b
commit 51ade9f043
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 15 additions and 8 deletions

View File

@ -2106,13 +2106,6 @@ FilterContainer.prototype.removeBadFilters = function() {
if ( entry === undefined ) {
continue;
}
if ( entry instanceof FilterHostnameDict ) {
entry.remove(fclass); // 'fclass' is hostname
if ( entry.size === 0 ) {
this.categories.delete(hash);
}
continue;
}
if ( entry instanceof FilterBucket ) {
entry.remove(fclass, fdata);
if ( entry.filters.length === 1 ) {
@ -2120,10 +2113,24 @@ FilterContainer.prototype.removeBadFilters = function() {
}
continue;
}
if ( entry.fid === fclass && entry.toSelfie() === fdata ) {
if ( entry instanceof FilterHostnameDict ) {
entry.remove(fclass); // 'fclass' is hostname
if ( entry.size === 0 ) {
bucket.delete(token);
if ( bucket.size === 0 ) {
this.categories.delete(hash);
}
}
continue;
}
if ( entry.fid === fclass && entry.toSelfie() === fdata ) {
bucket.delete(token);
if ( bucket.size === 0 ) {
this.categories.delete(hash);
}
continue;
}
}
};
/******************************************************************************/