@samitouri / QOS-React-1 / commits / 778e1ed2e5

[Fiber] Fix missing render times when we cancel a pending commit (#31065)

Sebastian "Sebbie" Silbermann committed Sep 26, 2024 at 00:20 UTC 778e1ed2e5ec22d4bac48e14167d3b4a6b28e8b8
2 files changed +3 -3
packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
+1 -1
@@ -3401,7 +3401,7 @@ export function suspendResource(
3401 }
3402 }
3403
3404 -export function waitForCommitToBeReady(): null | (Function => Function) {
3404 +export function waitForCommitToBeReady(): null | ((() => void) => () => void) {
3405 if (suspendedState === null) {
3406 throw new Error(
3407 'Internal React Error: suspendedState null when it was expected to exists. Please report this as a React bug.',
packages/react-reconciler/src/ReactFiberWorkLoop.js
+2 -2
@@ -1308,6 +1308,8 @@ function commitRootWhenReady(
1308 updatedLanes,
1309 suspendedRetryLanes,
1310 SUSPENDED_COMMIT,
1311 + completedRenderStartTime,
1312 + completedRenderEndTime,
1313 ),
1314 );
1315 const didAttemptEntireTree = !didSkipSuspendedSiblings;
@@ -3001,8 +3003,6 @@ function commitRoot(
3003 ReactSharedInternals.T = prevTransition;
3004 setCurrentUpdatePriority(previousUpdateLanePriority);
3005 }
3004 -
3005 - return null;
3006 }
3007
3008 function commitRootImpl(