File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 44// https://encoding.spec.whatwg.org 
55
66const  { 
7-   Map, 
87  ObjectCreate, 
98  ObjectDefineProperties, 
109  ObjectGetOwnPropertyDescriptors, 
10+   SafeMap, 
11+   StringPrototypeSlice, 
1112  Symbol, 
1213  SymbolToStringTag, 
1314  Uint32Array, 
@@ -74,7 +75,7 @@ const CONVERTER_FLAGS_IGNORE_BOM = 0x4;
7475
7576const  empty  =  new  Uint8Array ( 0 ) ; 
7677
77- const  encodings  =  new  Map ( [ 
78+ const  encodings  =  new  SafeMap ( [ 
7879  [ 'unicode-1-1-utf-8' ,  'utf-8' ] , 
7980  [ 'utf8' ,  'utf-8' ] , 
8081  [ 'utf-8' ,  'utf-8' ] , 
@@ -309,7 +310,7 @@ function trimAsciiWhitespace(label) {
309310    label [ e  -  1 ]  ===  '\u0020' ) )  { 
310311    e -- ; 
311312  } 
312-   return  label . slice ( s ,  e ) ; 
313+   return  StringPrototypeSlice ( label ,   s ,  e ) ; 
313314} 
314315
315316function  getEncodingFromLabel ( label )  { 
@@ -504,7 +505,7 @@ function makeTextDecoderJS() {
504505        // If the very first result in the stream is a BOM, and we are not 
505506        // explicitly told to ignore it, then we discard it. 
506507        if  ( result [ 0 ]  ===  '\ufeff' )  { 
507-           result  =  result . slice ( 1 ) ; 
508+           result  =  StringPrototypeSlice ( result ,   1 ) ; 
508509        } 
509510        this [ kBOMSeen ]  =  true ; 
510511      } 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments