mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02: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:
committed by
Andreas Kling
parent
fc070c8cbd
commit
9d5e538247
Notes:
sideshowbarker
2024-07-17 03:00:02 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/9d5e538247 Pull-request: https://github.com/SerenityOS/serenity/pull/24165 Reviewed-by: https://github.com/kennethmyhra ✅ Reviewed-by: https://github.com/shannonbooth ✅
@@ -63,7 +63,7 @@ WebIDL::ExceptionOr<JS::GCPtr<JS::Object>> WritableStreamDefaultWriter::abort(JS
|
||||
}
|
||||
|
||||
// 2. Return ! WritableStreamDefaultWriterAbort(this, reason).
|
||||
return TRY(writable_stream_default_writer_abort(*this, reason))->promise();
|
||||
return writable_stream_default_writer_abort(*this, reason)->promise();
|
||||
}
|
||||
|
||||
// https://streams.spec.whatwg.org/#default-writer-close
|
||||
@@ -117,7 +117,7 @@ WebIDL::ExceptionOr<JS::GCPtr<JS::Object>> WritableStreamDefaultWriter::write(JS
|
||||
}
|
||||
|
||||
// 2. Return ! WritableStreamDefaultWriterWrite(this, chunk).
|
||||
return TRY(writable_stream_default_writer_write(*this, chunk))->promise();
|
||||
return writable_stream_default_writer_write(*this, chunk)->promise();
|
||||
}
|
||||
|
||||
WritableStreamDefaultWriter::WritableStreamDefaultWriter(JS::Realm& realm)
|
||||
|
||||
Reference in New Issue
Block a user