File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -318,6 +318,8 @@ function validateAbortController(obj) {
318318} 
319319
320320class  AbortController  { 
321+   #signal; 
322+ 
321323  constructor ( )  { 
322324    this [ kSignal ]  =  createAbortSignal ( ) ; 
323325  } 
@@ -327,15 +329,16 @@ class AbortController {
327329   */ 
328330  get  signal ( )  { 
329331    validateAbortController ( this ) ; 
330-     return  this [ kSignal ] ; 
332+     this . #signal ??=  createAbortSignal ( ) ; 
333+     return  this . #signal; 
331334  } 
332335
333336  /** 
334337   * @param  {any } reason 
335338   */ 
336339  abort ( reason  =  new  DOMException ( 'This operation was aborted' ,  'AbortError' ) )  { 
337340    validateAbortController ( this ) ; 
338-     abortSignal ( this [ kSignal ] ,  reason ) ; 
341+     abortSignal ( this . #signal  ??=   createAbortSignal ( ) ,  reason ) ; 
339342  } 
340343
341344  [ customInspectSymbol ] ( depth ,  options )  { 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments