mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 14:28:49 +00:00
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:
parent
1c1b902a6a
commit
2692db8699
Notes:
sideshowbarker
2024-07-17 01:01:29 +09:00
Author: https://github.com/trflynn89
Commit: 2692db8699
Pull-request: https://github.com/SerenityOS/serenity/pull/17220
Reviewed-by: https://github.com/linusg ✅
694 changed files with 1774 additions and 1065 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue