mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
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:
parent
fc070c8cbd
commit
9d5e538247
Notes:
sideshowbarker
2024-07-17 03:00:02 +09:00
Author: https://github.com/trflynn89
Commit: 9d5e538247
Pull-request: https://github.com/SerenityOS/serenity/pull/24165
Reviewed-by: https://github.com/kennethmyhra ✅
Reviewed-by: https://github.com/shannonbooth ✅
7 changed files with 71 additions and 77 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue