1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-15 07:22:28 +02:00

fix load-time race condition for high-generic cosmetic filters

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.
This commit is contained in:
Raymond Hill 2018-07-16 09:30:36 -04:00
parent 41a2012b2d
commit dcd98f4efa
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -554,7 +554,9 @@ FilterContainer.prototype.freeze = function() {
}
}
this.highlyGeneric.simple.str = Array.from(this.highlyGeneric.simple.dict).join(',\n');
this.highlyGeneric.simple.mru.reset();
this.highlyGeneric.complex.str = Array.from(this.highlyGeneric.complex.dict).join(',\n');
this.highlyGeneric.complex.mru.reset();
this.frozen = true;
};