mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 17:41:03 +01:00
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
1 changed files with 3 additions and 1 deletions
|
@ -61,7 +61,9 @@
|
|||
this._urlIn = '';
|
||||
this._urlOut = '';
|
||||
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.resetKnownTokens();
|
||||
|
|
Loading…
Reference in a new issue