mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-30 17:42:45 +00:00 
			
		
		
		
	 62c7608a25
			
		
	
	
		62c7608a25
		
	
	
	
	
		
			
			LibWeb is now responsible for logging unhandled exceptions itself, which means set_should_log_exceptions() is no longer used and can be removed. It turned out to be not the best option for web page exception logging, as we would have no indication regarding whether the exception was later handled of not.
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			334 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			334 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibJS/Runtime/VM.h>
 | |
| #include <LibWeb/Bindings/MainThreadVM.h>
 | |
| 
 | |
| namespace Web::Bindings {
 | |
| 
 | |
| JS::VM& main_thread_vm()
 | |
| {
 | |
|     static RefPtr<JS::VM> vm;
 | |
|     if (!vm)
 | |
|         vm = JS::VM::create();
 | |
|     return *vm;
 | |
| }
 | |
| 
 | |
| }
 |