From 22e97332fcefbc0a9160f2167f1fed3da83e9296 Mon Sep 17 00:00:00 2001 From: Matthew Olsson Date: Tue, 25 Apr 2023 18:22:09 -0700 Subject: [PATCH] LibWeb: Throw the correct object when enqueuing to a readable stream --- Userland/Libraries/LibWeb/Streams/AbstractOperations.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Streams/AbstractOperations.cpp b/Userland/Libraries/LibWeb/Streams/AbstractOperations.cpp index a2576eadfc..33cb9f48eb 100644 --- a/Userland/Libraries/LibWeb/Streams/AbstractOperations.cpp +++ b/Userland/Libraries/LibWeb/Streams/AbstractOperations.cpp @@ -513,7 +513,8 @@ WebIDL::ExceptionOr readable_stream_default_controller_enqueue(ReadableStr readable_stream_default_controller_error(controller, throw_completion.value().value()); // 2. Return enqueueResult. - return enqueue_result; + // Note: We need to return the throw_completion object here, as enqueue needs to throw the same object that the controller is errored with + return throw_completion; } }