dillon1000/react

Commit

Scheduling Profiler marks should include thrown Errors (#22417)

The scheduling profiler markComponentRenderStopped method is supposed to be called when rendering finishes or when a value is thrown (Suspense or Error). Previously we were calling this in a Suspense-only path of `throwException`.

This PR updates the code to handle errors (or non-Thenables) thrown as well.

It also moves the mark logic the work loop `handleError` method, with Suspense/Error agnostic cleanup.
Browse files
Changed paths6 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberThrow.new.js ModifiedM packages/react-reconciler/src/ReactFiberThrow.old.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.new.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.old.js ModifiedM packages/react-reconciler/src/SchedulingProfiler.js ModifiedM packages/react-reconciler/src/__tests__/SchedulingProfiler-test.internal.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…