File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -582,7 +582,7 @@ class BidiTrieContainer {
582
582
}
583
583
584
584
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 ) ;
586
586
return { buf32, checksum : i32Checksum ( buf32 ) } ;
587
587
}
588
588
Original file line number Diff line number Diff line change @@ -452,7 +452,7 @@ class HNTrieContainer {
452
452
}
453
453
454
454
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 ) ;
456
456
return { buf32, checksum : i32Checksum ( buf32 ) } ;
457
457
}
458
458
Original file line number Diff line number Diff line change @@ -495,7 +495,7 @@ const filterDataReset = ( ) => {
495
495
filterDataWritePtr = 2 ;
496
496
} ;
497
497
const filterDataToSelfie = ( ) =>
498
- filterData . slice ( 0 , filterDataWritePtr ) ;
498
+ filterData . subarray ( 0 , filterDataWritePtr ) ;
499
499
500
500
const filterDataFromSelfie = selfie => {
501
501
if ( selfie instanceof Int32Array === false ) { return false ; }
@@ -3193,7 +3193,7 @@ const urlTokenizer = new (class {
3193
3193
}
3194
3194
3195
3195
toSelfie ( ) {
3196
- return this . knownTokens . slice ( ) ;
3196
+ return this . knownTokens ;
3197
3197
}
3198
3198
3199
3199
fromSelfie ( selfie ) {
@@ -4779,7 +4779,7 @@ StaticNetFilteringEngine.prototype.toSelfie = function() {
4779
4779
processedFilterCount : this . processedFilterCount ,
4780
4780
acceptedCount : this . acceptedCount ,
4781
4781
discardedCount : this . discardedCount ,
4782
- bitsToBucket : new Map ( this . bitsToBucket ) ,
4782
+ bitsToBucket : this . bitsToBucket ,
4783
4783
urlTokenizer : urlTokenizer . toSelfie ( ) ,
4784
4784
destHNTrieContainer : destHNTrieContainer . toSelfie ( ) ,
4785
4785
origHNTrieContainer : origHNTrieContainer . toSelfie ( ) ,
You can’t perform that action at this time.
0 commit comments