1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 14:14:58 +00:00

LibWeb: Make factory method of HTML::DOMStringMap fallible

This commit is contained in:
Kenneth Myhra 2023-02-15 19:18:58 +01:00 committed by Linus Groh
parent 809206f50e
commit b604bbaf29
4 changed files with 8 additions and 5 deletions

View file

@ -12,10 +12,10 @@
namespace Web::HTML {
JS::NonnullGCPtr<DOMStringMap> DOMStringMap::create(DOM::Element& element)
WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMStringMap>> DOMStringMap::create(DOM::Element& element)
{
auto& realm = element.realm();
return realm.heap().allocate<DOMStringMap>(realm, element).release_allocated_value_but_fixme_should_propagate_errors();
return MUST_OR_THROW_OOM(realm.heap().allocate<DOMStringMap>(realm, element));
}
DOMStringMap::DOMStringMap(DOM::Element& element)