dillon1000/react
Commit
Browse files [Fiber] Track SuspendedState on stack instead of global (#34486)
Stacked on #34481. We currently track the suspended state temporarily with a global which is safe as long as we always read it during a sync pass. However, we sometimes read it in closures and then we have to be carefully to pass the right one since it's possible another commit on a different root has started at that point. This avoids this footgun. Another reason to do this is that I want to read it in `startViewTransition` which is in an async gap after which point it's no longer safe. So I have to pass that through the `commitRoot` bound function.
Changed paths10 files
First-parent comparisonpackages/react-art/src/ReactFiberConfigART.js ModifiedM packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js ModifiedM packages/react-native-renderer/src/ReactFiberConfigFabric.js ModifiedM packages/react-native-renderer/src/ReactFiberConfigNative.js ModifiedM packages/react-noop-renderer/src/createReactNoop.js ModifiedM packages/react-reconciler/src/ReactFiberCommitWork.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react-reconciler/src/__tests__/ReactFiberHostContext-test.internal.js ModifiedM packages/react-reconciler/src/forks/ReactFiberConfig.custom.js ModifiedM packages/react-test-renderer/src/ReactFiberConfigTestHost.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…