mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
fix #2656
This commit is contained in:
parent
e425290c8f
commit
9a4681d4e1
1 changed files with 5 additions and 1 deletions
|
@ -285,6 +285,9 @@
|
|||
// longer needed. A timer will be used for self-garbage-collect.
|
||||
// Cleaning up 10s after last hit sounds reasonable.
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/2656
|
||||
// Can't use chained calls if we want to support legacy Map().
|
||||
|
||||
µBlock.stringDeduplicater = {
|
||||
strings: new Map(),
|
||||
timer: undefined,
|
||||
|
@ -293,7 +296,8 @@
|
|||
lookup: function(s) {
|
||||
var t = this.strings.get(s);
|
||||
if ( t === undefined ) {
|
||||
t = this.strings.set(s, s).get(s);
|
||||
this.strings.set(s, s);
|
||||
t = this.strings.get(s);
|
||||
if ( this.timer === undefined ) { this.cleanupAsync(); }
|
||||
}
|
||||
this.last = Date.now();
|
||||
|
|
Loading…
Reference in a new issue