mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 17:28:48 +00:00
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;
|
|
}
|
|
|
|
}
|