LibWeb: Use the proper in-flight request to check if a stream is closing

This commit is contained in:
Timothy Flynn
2024-04-01 09:52:27 -04:00
committed by Alexander Kalenik
parent 59cd086199
commit b6501adef8
3 changed files with 48 additions and 1 deletions

View File

@@ -3492,7 +3492,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> writable_stream_add_write
bool writable_stream_close_queued_or_in_flight(WritableStream const& stream)
{
// 1. If stream.[[closeRequest]] is undefined and stream.[[inFlightCloseRequest]] is undefined, return false.
if (!stream.close_request() && !stream.in_flight_write_request())
if (!stream.close_request() && !stream.in_flight_close_request())
return false;
// 2. Return true.