From 5a2260a0bc22c785af6b3af0eb0ba67f37a64488 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Fri, 15 Nov 2024 11:54:33 -0500 Subject: [PATCH] LibWeb: Return the readable stream error directly instead of as a string This error is not a string object, it's e.g. a JS::TypeError. This now matches similar handling of writable stream errors. --- Libraries/LibWeb/Streams/AbstractOperations.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibWeb/Streams/AbstractOperations.cpp b/Libraries/LibWeb/Streams/AbstractOperations.cpp index 3d92a0539ea..e2b59fef270 100644 --- a/Libraries/LibWeb/Streams/AbstractOperations.cpp +++ b/Libraries/LibWeb/Streams/AbstractOperations.cpp @@ -5071,7 +5071,7 @@ GC::Ref transform_stream_default_sink_close_algorithm(Transform transform_stream_error(stream, reason); // 2. Throw readable.[[storedError]]. - return WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, readable->stored_error().as_string().utf8_string() }; + return JS::throw_completion(readable->stored_error()); })); return react_result;