mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-10-31 05:10:57 +00:00 
			
		
		
		
	 660d533b50
			
		
	
	
		660d533b50
		
	
	
	
	
		
			
			It can fail if we're talking to a badly-behaved proxy when enumerating object properties for iteration.
		
			
				
	
	
		
			12 lines
		
	
	
	
		
			279 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
	
		
			279 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| test("iterate over bogus proxy", () => {
 | |
|     expect(() => {
 | |
|         let proxy = new Proxy([123], {
 | |
|             getOwnPropertyDescriptor: function (p) {
 | |
|                 return undefined;
 | |
|             },
 | |
|         });
 | |
| 
 | |
|         for (const p in proxy) {
 | |
|         }
 | |
|     }).toThrow();
 | |
| });
 |