mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-02 16:33:13 +00:00
LibWeb: Remove exceptional return types from infallible stream IDL
This commit is contained in:
parent
572a7bb313
commit
2d4d16ac37
Notes:
sideshowbarker
2024-07-16 23:51:07 +09:00
Author: https://github.com/trflynn89
Commit: 2d4d16ac37
Pull-request: https://github.com/SerenityOS/serenity/pull/24165
Reviewed-by: https://github.com/kennethmyhra ✅
Reviewed-by: https://github.com/shannonbooth ✅
15 changed files with 26 additions and 29 deletions
|
@ -139,7 +139,7 @@ WebIDL::ExceptionOr<void> FileReader::read_operation(Blob& blob, Type type, Opti
|
|||
ByteBuffer bytes;
|
||||
|
||||
// 8. Let chunkPromise be the result of reading a chunk from stream with reader.
|
||||
auto chunk_promise = TRY(reader->read());
|
||||
auto chunk_promise = reader->read();
|
||||
|
||||
// 9. Let isFirstChunk be true.
|
||||
bool is_first_chunk = true;
|
||||
|
@ -183,7 +183,7 @@ WebIDL::ExceptionOr<void> FileReader::read_operation(Blob& blob, Type type, Opti
|
|||
// FIXME: 3. If roughly 50ms have passed since these steps were last invoked, queue a task to fire a progress event called progress at fr.
|
||||
|
||||
// 4. Set chunkPromise to the result of reading a chunk from stream with reader.
|
||||
chunk_promise = MUST(reader->read());
|
||||
chunk_promise = reader->read();
|
||||
}
|
||||
// 5. Otherwise, if chunkPromise is fulfilled with an object whose done property is true, queue a task to run the following steps and abort this algorithm:
|
||||
else if (chunk_promise->state() == JS::Promise::State::Fulfilled && done.as_bool()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue