diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 05:50:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 05:50:19 +0000 |
commit | b6a97bcbb33b667a7ee4acb2eb8e482333e95a1b (patch) | |
tree | 89830d7d7c2cd02e552447883d02800d56cdf323 /src/lib/publicsuffixlist/publicsuffixlist.js | |
parent | Releasing progress-linux version 1.55.0+dfsg-1~progress7.99u1. (diff) | |
download | ublock-origin-b6a97bcbb33b667a7ee4acb2eb8e482333e95a1b.tar.xz ublock-origin-b6a97bcbb33b667a7ee4acb2eb8e482333e95a1b.zip |
Merging upstream version 1.57.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/lib/publicsuffixlist/publicsuffixlist.js')
-rw-r--r-- | src/lib/publicsuffixlist/publicsuffixlist.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/publicsuffixlist/publicsuffixlist.js b/src/lib/publicsuffixlist/publicsuffixlist.js index 6483c89..87910d4 100644 --- a/src/lib/publicsuffixlist/publicsuffixlist.js +++ b/src/lib/publicsuffixlist/publicsuffixlist.js @@ -13,8 +13,6 @@ /*! Home: https://github.com/gorhill/publicsuffixlist.js -- GPLv3 APLv2 */ -/* globals WebAssembly, exports:true, module */ - 'use strict'; /******************************************************************************* @@ -70,7 +68,7 @@ const RULES_PTR_SLOT = 100; // 100 / 400 (400-256=144 => 144>128) const SUFFIX_NOT_FOUND_SLOT = 399; // -- / 399 (safe, see above) const CHARDATA_PTR_SLOT = 101; // 101 / 404 const EMPTY_STRING = ''; -const SELFIE_MAGIC = 2; +const SELFIE_MAGIC = 3; let wasmMemory; let pslBuffer32; @@ -499,9 +497,7 @@ const toSelfie = function(encoder) { } return { magic: SELFIE_MAGIC, - buf32: Array.from( - new Uint32Array(pslBuffer8.buffer, 0, pslByteLength >>> 2) - ), + buf32: pslBuffer32.subarray(0, pslByteLength >> 2), }; }; @@ -524,7 +520,7 @@ const fromSelfie = function(selfie, decoder) { } else if ( selfie instanceof Object && selfie.magic === SELFIE_MAGIC && - Array.isArray(selfie.buf32) + selfie.buf32 instanceof Uint32Array ) { byteLength = selfie.buf32.length << 2; allocateBuffers(byteLength); |