SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

0 0 114 JavaScript

[Fizz] prevent reentrant finishedTask from calling completeAll multiple times (#36287)

It is possible for the fallback tasks from a Suspense boundary to
trigger an early `completeAll` call which is later repeated due to
`finishedTask` reentrancy. For node.js in particular this might be
problematic since we invoke a callback on each `completeAll` call but in
general it just isn't the right semantics since the call is running
slightly earlier than the completion of the last `finishedTask`
invocation. This change ensures that any reentrant `finishedTask` calls
(due to soft aborting fallback tasks) omit the `completeAll` call by
temporarily incrementing the total pending tasks.
J
Josh Story committed
ea6792026ff7bc4c9c663fd09149cc523490cb1a
Parent: 56922cf
Committed by GitHub <noreply@github.com> on 4/16/2026, 8:26:34 PM