Skip to content

Commit 02cba63

Browse files
committed
Partially revert 4169340
1 parent 5f2ee6c commit 02cba63

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/js/biditrie.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ class BidiTrieContainer {
582582
}
583583

584584
toSelfie() {
585-
const buf32 = this.buf32.slice(0, this.buf32[CHAR1_SLOT] + 3 >>> 2);
585+
const buf32 = this.buf32.subarray(0, this.buf32[CHAR1_SLOT] + 3 >>> 2);
586586
return { buf32, checksum: i32Checksum(buf32) };
587587
}
588588

src/js/hntrie.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ class HNTrieContainer {
452452
}
453453

454454
toSelfie() {
455-
const buf32 = this.buf32.slice(0, this.buf32[CHAR1_SLOT] + 3 >>> 2);
455+
const buf32 = this.buf32.subarray(0, this.buf32[CHAR1_SLOT] + 3 >>> 2);
456456
return { buf32, checksum: i32Checksum(buf32) };
457457
}
458458

src/js/static-net-filtering.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ const filterDataReset = ( ) => {
495495
filterDataWritePtr = 2;
496496
};
497497
const filterDataToSelfie = ( ) =>
498-
filterData.slice(0, filterDataWritePtr);
498+
filterData.subarray(0, filterDataWritePtr);
499499

500500
const filterDataFromSelfie = selfie => {
501501
if ( selfie instanceof Int32Array === false ) { return false; }
@@ -3193,7 +3193,7 @@ const urlTokenizer = new (class {
31933193
}
31943194

31953195
toSelfie() {
3196-
return this.knownTokens.slice();
3196+
return this.knownTokens;
31973197
}
31983198

31993199
fromSelfie(selfie) {
@@ -4779,7 +4779,7 @@ StaticNetFilteringEngine.prototype.toSelfie = function() {
47794779
processedFilterCount: this.processedFilterCount,
47804780
acceptedCount: this.acceptedCount,
47814781
discardedCount: this.discardedCount,
4782-
bitsToBucket: new Map(this.bitsToBucket),
4782+
bitsToBucket: this.bitsToBucket,
47834783
urlTokenizer: urlTokenizer.toSelfie(),
47844784
destHNTrieContainer: destHNTrieContainer.toSelfie(),
47854785
origHNTrieContainer: origHNTrieContainer.toSelfie(),

0 commit comments

Comments
 (0)