mirror of https://github.com/gorhill/uBlock.git
Fix token array being too small for very long URL
Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/dzw57l/ Each token requires two slots in the token indices array. This commit fixes uBO breaking when dealing with very long URLs with lot of distinct tokens in them.
This commit is contained in:
parent
ff91870670
commit
1b068c15fb
|
@ -61,7 +61,9 @@
|
||||||
this._urlIn = '';
|
this._urlIn = '';
|
||||||
this._urlOut = '';
|
this._urlOut = '';
|
||||||
this._tokenized = false;
|
this._tokenized = false;
|
||||||
this._tokens = new Uint32Array(1024);
|
// https://www.reddit.com/r/uBlockOrigin/comments/dzw57l/
|
||||||
|
// Remember: 1 token needs two slots
|
||||||
|
this._tokens = new Uint32Array(2064);
|
||||||
|
|
||||||
this.knownTokens = new Uint8Array(65536);
|
this.knownTokens = new Uint8Array(65536);
|
||||||
this.resetKnownTokens();
|
this.resetKnownTokens();
|
||||||
|
|
Loading…
Reference in New Issue