flushSync: Exhaust queue even if something throws (#26366)
If something throws as a result of `flushSync`, and there's remaining work left in the queue, React should keep working until all the work is complete. If multiple errors are thrown, React will combine them into an AggregateError object and throw that. In environments where AggregateError is not available, React will rethrow in an async task. (All the evergreen runtimes support AggregateError.) The scenario where this happens is relatively rare, because `flushSync` will only throw if there's no error boundary to capture the error.
A
Andrew Clark committed
93c10dfa6b0848c12189b773b59c77d74cad2a1a
Parent: a22bd99
Committed by GitHub <noreply@github.com>
on 3/10/2023, 10:21:34 PM