mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 05:22:45 +00:00 
			
		
		
		
	 c0e4353bde
			
		
	
	
		c0e4353bde
		
	
	
	
	
		
			
			In the case of an exception in a property getter function we would not return early, and a subsequent attempt to call the replacer function would crash the interpreter due to call_internal() asserting. Fixes #3548.
		
			
				
	
	
		
			10 lines
		
	
	
	
		
			256 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
	
		
			256 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| test("Issue #3548, exception in property getter with replacer function", () => {
 | |
|     const o = {
 | |
|         get foo() {
 | |
|             throw Error();
 | |
|         },
 | |
|     };
 | |
|     expect(() => {
 | |
|         JSON.stringify(o, (_, value) => value);
 | |
|     }).toThrow(Error);
 | |
| });
 |