mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibWeb: Make factory method of DOM::AbortController fallible
This commit is contained in:
parent
491c18a346
commit
5f552ddc5c
Notes:
sideshowbarker
2024-07-17 04:49:48 +09:00
Author: https://github.com/kennethmyhra Commit: https://github.com/SerenityOS/serenity/commit/5f552ddc5c Pull-request: https://github.com/SerenityOS/serenity/pull/17491 Reviewed-by: https://github.com/linusg ✅
@ -10,10 +10,10 @@
|
||||
|
||||
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);
|
||||
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
|
||||
|
@ -16,7 +16,7 @@ class AbortController final : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(AbortController, Bindings::PlatformObject);
|
||||
|
||||
public:
|
||||
static JS::NonnullGCPtr<AbortController> construct_impl(JS::Realm&);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<AbortController>> construct_impl(JS::Realm&);
|
||||
|
||||
virtual ~AbortController() override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user