diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index a5973f525..c6b4f00c6 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -3130,9 +3130,9 @@ const urlTokenizer = new (class { } // Tokenize on demand. - getTokens(encodeInto) { + getTokens() { if ( this._tokenized ) { return this._tokens; } - let i = this._tokenize(encodeInto); + let i = this._tokenize(); this._tokens[i+0] = ANY_TOKEN_HASH; this._tokens[i+1] = 0; i += 2; @@ -3189,17 +3189,17 @@ const urlTokenizer = new (class { // https://github.com/chrisaljoudi/uBlock/issues/1118 // We limit to a maximum number of tokens. - _tokenize(encodeInto) { + _tokenize() { const tokens = this._tokens; const url = this._urlOut; - const l = encodeInto.setHaystackLen(url.length); + const l = bidiTrie.setHaystackLen(url.length); if ( l === 0 ) { return 0; } let j = 0; let hasq = -1; mainLoop: { const knownTokens = this.knownTokens; const vtc = this._validTokenChars; - const charCodes = encodeInto.haystack; + const charCodes = bidiTrie.haystack; let i = 0, n = 0, ti = 0, th = 0; for (;;) { for (;;) { @@ -4968,7 +4968,7 @@ StaticNetFilteringEngine.prototype.matchAndFetchModifiers = function( results, }; - const tokenHashes = urlTokenizer.getTokens(bidiTrie); + const tokenHashes = urlTokenizer.getTokens(); let i = 0; let th = 0, iunit = 0; for (;;) { @@ -5158,7 +5158,7 @@ StaticNetFilteringEngine.prototype.realmMatchString = function( } // Pattern-based filters else { - const tokenHashes = urlTokenizer.getTokens(bidiTrie); + const tokenHashes = urlTokenizer.getTokens(); let i = 0; for (;;) { tokenHash = tokenHashes[i];