mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 06:47:34 +00:00
LibJS: Propagate errors from VM creation
This commit is contained in:
parent
eb5aae24f4
commit
13dfadba79
13 changed files with 15 additions and 15 deletions
|
@ -56,7 +56,7 @@ JS::VM& main_thread_vm()
|
|||
{
|
||||
static RefPtr<JS::VM> vm;
|
||||
if (!vm) {
|
||||
vm = JS::VM::create(make<WebEngineCustomData>());
|
||||
vm = JS::VM::create(make<WebEngineCustomData>()).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
// NOTE: We intentionally leak the main thread JavaScript VM.
|
||||
// This avoids doing an exhaustive garbage collection on process exit.
|
||||
|
|
|
@ -23,7 +23,7 @@ Worker::Worker(String const& script_url, WorkerOptions const options, DOM::Docum
|
|||
, m_options(options)
|
||||
, m_document(&document)
|
||||
, m_custom_data()
|
||||
, m_worker_vm(JS::VM::create(adopt_own(m_custom_data)))
|
||||
, m_worker_vm(JS::VM::create(adopt_own(m_custom_data)).release_value_but_fixme_should_propagate_errors())
|
||||
, m_interpreter(JS::Interpreter::create<JS::GlobalObject>(m_worker_vm))
|
||||
, m_interpreter_scope(*m_interpreter)
|
||||
, m_implicit_port(MessagePort::create(document.realm()).release_value_but_fixme_should_propagate_errors())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue