dillon1000/react
Commit
Browse files Error recovery should have task priority
This uncovered a separate issue where some errors were being unscheduled and rescheduled multiple times before flushing. Turns out we need to check both a fiber and its alternate when determining if it represents a failed unit of work. I didn't notice this before because we were scheduling a new update on *every* boundary at the end of the commit phase, not just the ones that captured an error during that commit. I updated the unit tests to catch this in the future.
Changed paths7 files
First-parent comparisonsrc/renderers/shared/fiber/ReactFiberBeginWork.js ModifiedM src/renderers/shared/fiber/ReactFiberCommitWork.js ModifiedM src/renderers/shared/fiber/ReactFiberScheduler.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncrementalErrorHandling-test.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncrementalScheduling-test.js ModifiedM src/renderers/shared/fiber/__tests__/ReactIncrementalSideEffects-test.js ModifiedM src/renderers/shared/shared/__tests__/ReactErrorBoundaries-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…