mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
LibWeb: Make factory method of DOM::NamedNodeMap fallible
This commit is contained in:
parent
ce18dfc417
commit
e3e281addd
3 changed files with 7 additions and 4 deletions
|
@ -13,10 +13,10 @@
|
|||
|
||||
namespace Web::DOM {
|
||||
|
||||
JS::NonnullGCPtr<NamedNodeMap> NamedNodeMap::create(Element& element)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<NamedNodeMap>> NamedNodeMap::create(Element& element)
|
||||
{
|
||||
auto& realm = element.realm();
|
||||
return realm.heap().allocate<NamedNodeMap>(realm, element).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<NamedNodeMap>(realm, element));
|
||||
}
|
||||
|
||||
NamedNodeMap::NamedNodeMap(Element& element)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue