mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
LibJS+LibWeb: Do not return error from VM::create
This never returns an error to propogate, also allowing ErrorOr to be removed from creating the main thread VM.
This commit is contained in:
parent
084cceab5c
commit
8263a9863f
Notes:
github-actions[bot]
2025-04-25 14:45:48 +00:00
Author: https://github.com/shannonbooth
Commit: 8263a9863f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4453
12 changed files with 13 additions and 15 deletions
|
@ -72,11 +72,11 @@ HTML::Script* active_script()
|
|||
});
|
||||
}
|
||||
|
||||
ErrorOr<void> initialize_main_thread_vm(HTML::EventLoop::Type type)
|
||||
void initialize_main_thread_vm(HTML::EventLoop::Type type)
|
||||
{
|
||||
VERIFY(!s_main_thread_vm);
|
||||
|
||||
s_main_thread_vm = TRY(JS::VM::create(make<HTML::SimilarOriginWindowAgent>()));
|
||||
s_main_thread_vm = JS::VM::create(make<HTML::SimilarOriginWindowAgent>());
|
||||
|
||||
auto& agent = as<HTML::Agent>(*s_main_thread_vm->agent());
|
||||
agent.event_loop = s_main_thread_vm->heap().allocate<HTML::EventLoop>(type);
|
||||
|
@ -645,8 +645,6 @@ ErrorOr<void> initialize_main_thread_vm(HTML::EventLoop::Type type)
|
|||
s_main_thread_vm->host_unrecognized_date_string = [](StringView date) {
|
||||
dbgln("Unable to parse date string: \"{}\"", date);
|
||||
};
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
JS::VM& main_thread_vm()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue