Skip to content

Commit

Permalink
Don't special-case TransformStream readables when streaming outgoing …
Browse files Browse the repository at this point in the history
…bodies

This special-casing used to make sense in the JS-Compute runtime, where certain TransformStreams were more optimizable. It doesn't anymore, and in any case would have to come with actually reading from the stream, which the code as written before this patch didn't 🤷
  • Loading branch information
tschneidereit committed Jun 16, 2024
1 parent 81391c8 commit 16b28ea
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions builtins/web/fetch/request-response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,14 +1050,6 @@ bool RequestOrResponse::maybe_stream_body(JSContext *cx, JS::HandleObject body_o
return false;
}

if (streams::TransformStream::is_ts_readable(cx, stream)) {
JSObject *ts = streams::TransformStream::ts_from_readable(cx, stream);
if (streams::TransformStream::readable_used_as_body(ts)) {
*requires_streaming = true;
return true;
}
}

// If the body stream is backed by an HTTP body handle, we can directly pipe
// that handle into the body we're about to send.
if (streams::NativeStreamSource::stream_is_body(cx, stream)) {
Expand Down

0 comments on commit 16b28ea

Please sign in to comment.