mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:02:44 +00:00 
			
		
		
		
	 7826cb2556
			
		
	
	
		7826cb2556
		
	
	
	
	
		
			
			This fixes an issue where we'd run out of C++ stack while traversing large GC heap graphs.
		
			
				
	
	
		
			11 lines
		
	
	
	
		
			207 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			207 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| test("garbage collection of a deeply-nested object graph", () => {
 | |
|     let root = {};
 | |
|     let o = root;
 | |
| 
 | |
|     for (let i = 0; i < 200_000; ++i) {
 | |
|         o.next = {};
 | |
|         o = o.next;
 | |
|     }
 | |
| 
 | |
|     gc();
 | |
| });
 |