LibWeb: Mark a few calls to set_attribute as infallible

These cannot possibly throw an exception because the attribute names are
already known to be valid.
This commit is contained in:
Timothy Flynn 2025-01-14 19:42:12 -05:00 committed by Jelle Raaijmakers
parent b43bb2429a
commit e95096d2a9
Notes: github-actions[bot] 2025-01-15 07:47:49 +00:00
3 changed files with 3 additions and 3 deletions

View file

@ -38,7 +38,7 @@ public:
WebIDL::Long value();
void set_value(WebIDL::Long value)
{
set_attribute(AttributeNames::value, String::number(value)).release_value_but_fixme_should_propagate_errors();
MUST(set_attribute(AttributeNames::value, String::number(value)));
}
private:

View file

@ -25,7 +25,7 @@ public:
WebIDL::Long start();
void set_start(WebIDL::Long start)
{
set_attribute(AttributeNames::start, String::number(start)).release_value_but_fixme_should_propagate_errors();
MUST(set_attribute(AttributeNames::start, String::number(start)));
}
private:

View file

@ -37,7 +37,7 @@ void HTMLSummaryElement::activation_behavior(DOM::Event const&)
if (parent->has_attribute(HTML::AttributeNames::open))
parent->remove_attribute(HTML::AttributeNames::open);
else
parent->set_attribute(HTML::AttributeNames::open, String {}).release_value_but_fixme_should_propagate_errors();
MUST(parent->set_attribute(HTML::AttributeNames::open, String {}));
}
// https://html.spec.whatwg.org/multipage/interactive-elements.html#summary-for-its-parent-details