LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors

Note that as of this commit, there aren't any such throwers, and the
call site in Heap::allocate will drop exceptions on the floor. This
commit only serves to change the declaration of the overrides, make sure
they return an empty value, and to propagate OOM errors frm their base
initialize invocations.
This commit is contained in:
Timothy Flynn 2023-01-28 12:33:35 -05:00 committed by Linus Groh
parent 1c1b902a6a
commit 2692db8699
Notes: sideshowbarker 2024-07-17 01:01:29 +09:00
694 changed files with 1774 additions and 1065 deletions

View file

@ -21,10 +21,12 @@ HTMLProgressElement::HTMLProgressElement(DOM::Document& document, DOM::Qualified
HTMLProgressElement::~HTMLProgressElement() = default;
void HTMLProgressElement::initialize(JS::Realm& realm)
JS::ThrowCompletionOr<void> HTMLProgressElement::initialize(JS::Realm& realm)
{
Base::initialize(realm);
MUST_OR_THROW_OOM(Base::initialize(realm));
set_prototype(&Bindings::ensure_web_prototype<Bindings::HTMLProgressElementPrototype>(realm, "HTMLProgressElement"));
return {};
}
JS::GCPtr<Layout::Node> HTMLProgressElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)