mirror of https://github.com/gorhill/uBlock.git
fix #2656
This commit is contained in:
parent
e425290c8f
commit
9a4681d4e1
|
@ -285,6 +285,9 @@
|
||||||
// longer needed. A timer will be used for self-garbage-collect.
|
// longer needed. A timer will be used for self-garbage-collect.
|
||||||
// Cleaning up 10s after last hit sounds reasonable.
|
// 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 = {
|
µBlock.stringDeduplicater = {
|
||||||
strings: new Map(),
|
strings: new Map(),
|
||||||
timer: undefined,
|
timer: undefined,
|
||||||
|
@ -293,7 +296,8 @@
|
||||||
lookup: function(s) {
|
lookup: function(s) {
|
||||||
var t = this.strings.get(s);
|
var t = this.strings.get(s);
|
||||||
if ( t === undefined ) {
|
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(); }
|
if ( this.timer === undefined ) { this.cleanupAsync(); }
|
||||||
}
|
}
|
||||||
this.last = Date.now();
|
this.last = Date.now();
|
||||||
|
|
Loading…
Reference in New Issue