SIGN IN SIGN UP

[Fizz] Construct the render lifetime controller only when it is needed (#37357)

This follows #37315, which added the render lifetime controller to bound
the abort listener that `attachAbortSignal` attaches to a caller's
signal. `RequestInstance` constructed one for every request, so a render
that is given no signal allocated a controller, aborted it on
completion, and nothing ever observed either.

The controller is now created in `attachAbortSignal`, and the three
places that end the lifetime go through `endRenderLifetime`, which does
nothing when there is no controller. Callers that pass a signal are
unaffected. Callers that do not no longer allocate one, and `signal` is
optional in every browser, edge and static entry point, while
`renderToPipeableStream` and `resumeToPipeableStream` accept no signal
at all.

They also no longer reach `AbortController` at all, which matters more
than the allocation. Fizz had no runtime dependency on it before #37315,
and an unconditional one reaches environments that provide the API
through a polyfill. An incomplete polyfill can then fail a render that
never asked for abort support.

The new test asserts that no controller is constructed when no signal is
passed. It fails with the eager construction restored, since nothing
else in the suite would notice a regression to it.
H
Hendrik Liebau committed
3d050805e802e6c340d2f0c0962dd5a1616a44a4
Parent: b939280
Committed by GitHub <noreply@github.com> on 8/24/2026, 5:46:15 PM