mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-24 03:59:09 +00:00
LibJS: Make Heap::allocate<T>() infallible
Stop worrying about tiny OOMs. Work towards #20449. While going through these, I also changed the function signature in many places where returning ThrowCompletionOr<T> is no longer necessary.
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
|
||||
namespace Web::HTML {
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMStringMap>> DOMStringMap::create(DOM::Element& element)
|
||||
JS::NonnullGCPtr<DOMStringMap> DOMStringMap::create(DOM::Element& element)
|
||||
{
|
||||
auto& realm = element.realm();
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<DOMStringMap>(realm, element));
|
||||
return realm.heap().allocate<DOMStringMap>(realm, element);
|
||||
}
|
||||
|
||||
DOMStringMap::DOMStringMap(DOM::Element& element)
|
||||
|
||||
Reference in New Issue
Block a user