1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:57:34 +00:00

LibWeb: Make factory method of DOM::AbortController fallible

This commit is contained in:
Kenneth Myhra 2023-02-14 20:45:54 +01:00 committed by Linus Groh
parent 491c18a346
commit 5f552ddc5c
2 changed files with 3 additions and 3 deletions

View file

@ -10,10 +10,10 @@
namespace Web::DOM { namespace Web::DOM {
JS::NonnullGCPtr<AbortController> AbortController::construct_impl(JS::Realm& realm) WebIDL::ExceptionOr<JS::NonnullGCPtr<AbortController>> AbortController::construct_impl(JS::Realm& realm)
{ {
auto signal = AbortSignal::construct_impl(realm); auto signal = AbortSignal::construct_impl(realm);
return realm.heap().allocate<AbortController>(realm, realm, move(signal)).release_allocated_value_but_fixme_should_propagate_errors(); return MUST_OR_THROW_OOM(realm.heap().allocate<AbortController>(realm, realm, move(signal)));
} }
// https://dom.spec.whatwg.org/#dom-abortcontroller-abortcontroller // https://dom.spec.whatwg.org/#dom-abortcontroller-abortcontroller

View file

@ -16,7 +16,7 @@ class AbortController final : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(AbortController, Bindings::PlatformObject); WEB_PLATFORM_OBJECT(AbortController, Bindings::PlatformObject);
public: public:
static JS::NonnullGCPtr<AbortController> construct_impl(JS::Realm&); static WebIDL::ExceptionOr<JS::NonnullGCPtr<AbortController>> construct_impl(JS::Realm&);
virtual ~AbortController() override; virtual ~AbortController() override;