LibWeb: Make factory method of HTML::MessagePort fallible

This commit is contained in:
Kenneth Myhra
2023-02-12 22:30:39 +01:00
committed by Linus Groh
parent 7ec444047c
commit 471ad7ba01
4 changed files with 8 additions and 8 deletions

View File

@@ -14,9 +14,9 @@
namespace Web::HTML {
JS::NonnullGCPtr<MessagePort> MessagePort::create(JS::Realm& realm)
WebIDL::ExceptionOr<JS::NonnullGCPtr<MessagePort>> MessagePort::create(JS::Realm& realm)
{
return realm.heap().allocate<MessagePort>(realm, realm).release_allocated_value_but_fixme_should_propagate_errors();
return MUST_OR_THROW_OOM(realm.heap().allocate<MessagePort>(realm, realm));
}
MessagePort::MessagePort(JS::Realm& realm)