mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:37:35 +00:00
LibWeb: Make factory method of DOM::AbortSignal fallible
This commit is contained in:
parent
c4d559bd37
commit
a5ad8b2959
3 changed files with 4 additions and 4 deletions
|
@ -12,7 +12,7 @@ namespace Web::DOM {
|
|||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<AbortController>> AbortController::construct_impl(JS::Realm& realm)
|
||||
{
|
||||
auto signal = AbortSignal::construct_impl(realm);
|
||||
auto signal = TRY(AbortSignal::construct_impl(realm));
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<AbortController>(realm, realm, move(signal)));
|
||||
}
|
||||
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
|
||||
namespace Web::DOM {
|
||||
|
||||
JS::NonnullGCPtr<AbortSignal> AbortSignal::construct_impl(JS::Realm& realm)
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<AbortSignal>> AbortSignal::construct_impl(JS::Realm& realm)
|
||||
{
|
||||
return realm.heap().allocate<AbortSignal>(realm, realm).release_allocated_value_but_fixme_should_propagate_errors();
|
||||
return MUST_OR_THROW_OOM(realm.heap().allocate<AbortSignal>(realm, realm));
|
||||
}
|
||||
|
||||
AbortSignal::AbortSignal(JS::Realm& realm)
|
||||
|
|
|
@ -18,7 +18,7 @@ class AbortSignal final : public EventTarget {
|
|||
WEB_PLATFORM_OBJECT(AbortSignal, EventTarget);
|
||||
|
||||
public:
|
||||
static JS::NonnullGCPtr<AbortSignal> construct_impl(JS::Realm&);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<AbortSignal>> construct_impl(JS::Realm&);
|
||||
|
||||
virtual ~AbortSignal() override = default;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue