mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00
LibWeb: Make factory method of HTML::WorkerNavigator fallible
This commit is contained in:
parent
86b7f148b9
commit
193de231e0
3 changed files with 7 additions and 4 deletions
|
@ -10,6 +10,7 @@
|
|||
#include <AK/Vector.h>
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibTextCodec/Decoder.h>
|
||||
#include <LibWeb/Bindings/ExceptionOrUtils.h>
|
||||
#include <LibWeb/Bindings/WorkerGlobalScopePrototype.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/HTML/EventHandler.h>
|
||||
|
@ -33,7 +34,9 @@ WorkerGlobalScope::~WorkerGlobalScope() = default;
|
|||
JS::ThrowCompletionOr<void> WorkerGlobalScope::initialize(JS::Realm& realm)
|
||||
{
|
||||
MUST_OR_THROW_OOM(Base::initialize(realm));
|
||||
m_navigator = WorkerNavigator::create(*this);
|
||||
m_navigator = TRY(Bindings::throw_dom_exception_if_needed(realm.vm(), [&]() {
|
||||
return WorkerNavigator::create(*this);
|
||||
}));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue