LibWeb: Mark writable stream abort steps as infallible

These don't throw. We can remove a decent amount of exception handling
by marking them infallible.
This commit is contained in:
Timothy Flynn 2024-04-29 17:16:24 -04:00 committed by Andreas Kling
commit 9d5e538247
Notes: sideshowbarker 2024-07-17 03:00:02 +09:00
7 changed files with 71 additions and 77 deletions

View file

@ -79,7 +79,7 @@ WebIDL::ExceptionOr<JS::GCPtr<JS::Object>> WritableStream::close()
}
// https://streams.spec.whatwg.org/#ws-abort
WebIDL::ExceptionOr<JS::GCPtr<JS::Object>> WritableStream::abort(JS::Value reason)
JS::GCPtr<JS::Object> WritableStream::abort(JS::Value reason)
{
auto& realm = this->realm();
@ -90,7 +90,7 @@ WebIDL::ExceptionOr<JS::GCPtr<JS::Object>> WritableStream::abort(JS::Value reaso
}
// 2. Return ! WritableStreamAbort(this, reason).
return TRY(writable_stream_abort(*this, reason))->promise();
return writable_stream_abort(*this, reason)->promise();
}
// https://streams.spec.whatwg.org/#ws-get-writer