1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:27:46 +00:00

LibWeb: Make factory method of DOM::Attr fallible

This commit is contained in:
Kenneth Myhra 2023-02-14 21:17:55 +01:00 committed by Linus Groh
parent b9c5828fe6
commit 50c5f0d7da
4 changed files with 10 additions and 10 deletions

View file

@ -13,9 +13,9 @@
namespace Web::DOM {
JS::NonnullGCPtr<Attr> Attr::create(Document& document, DeprecatedFlyString local_name, DeprecatedString value, Element const* owner_element)
WebIDL::ExceptionOr<JS::NonnullGCPtr<Attr>> Attr::create(Document& document, DeprecatedFlyString local_name, DeprecatedString value, Element const* owner_element)
{
return document.heap().allocate<Attr>(document.realm(), document, QualifiedName(move(local_name), {}, {}), move(value), owner_element).release_allocated_value_but_fixme_should_propagate_errors();
return MUST_OR_THROW_OOM(document.heap().allocate<Attr>(document.realm(), document, QualifiedName(move(local_name), {}, {}), move(value), owner_element));
}
JS::NonnullGCPtr<Attr> Attr::clone(Document& document)