Skip to content

Commit

Permalink
fix load-time race condition for high-generic cosmetic filters
Browse files Browse the repository at this point in the history
potentially causing high-generic cosmetic filters to not be applied
because the MRU cache contains an empty list of high-generic filters
when there is a query from a content script for cosmetic filters
before they are fully loaded and ready.
  • Loading branch information
gorhill committed Jul 17, 2018
1 parent a9f24fd commit 5caf167
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/js/cosmetic-filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,9 @@ FilterContainer.prototype.freeze = function() {
}
}
this.highlyGeneric.simple.str = µb.arrayFrom(this.highlyGeneric.simple.dict).join(',\n');
this.highlyGeneric.simple.mru.reset();
this.highlyGeneric.complex.str = µb.arrayFrom(this.highlyGeneric.complex.dict).join(',\n');
this.highlyGeneric.complex.mru.reset();

this.frozen = true;
};
Expand Down

0 comments on commit 5caf167

Please sign in to comment.