Quellcode durchsuchen

LibWeb: Throw the correct object when enqueuing to a readable stream

Matthew Olsson vor 2 Jahren
Ursprung
Commit
22e97332fc
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      Userland/Libraries/LibWeb/Streams/AbstractOperations.cpp

+ 2 - 1
Userland/Libraries/LibWeb/Streams/AbstractOperations.cpp

@@ -513,7 +513,8 @@ WebIDL::ExceptionOr<void> readable_stream_default_controller_enqueue(ReadableStr
             readable_stream_default_controller_error(controller, throw_completion.value().value());
             readable_stream_default_controller_error(controller, throw_completion.value().value());
 
 
             // 2. Return enqueueResult.
             // 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;
         }
         }
     }
     }