Skip to content

Commit 5f9db2f

Browse files
committed
[Fiber] Fix missing render times when we cancel a pending commit (#31065)
DiffTrain build for [778e1ed](778e1ed)
1 parent 9b61452 commit 5f9db2f

34 files changed

+344
-362
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0f1856c49febe96923e469f98c0b123130ea015c
1+
778e1ed2e5ec22d4bac48e14167d3b4a6b28e8b8
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0f1856c49febe96923e469f98c0b123130ea015c
1+
778e1ed2e5ec22d4bac48e14167d3b4a6b28e8b8

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,7 @@ __DEV__ &&
20002000
exports.useTransition = function () {
20012001
return resolveDispatcher().useTransition();
20022002
};
2003-
exports.version = "19.0.0-www-classic-0f1856c4-20240925";
2003+
exports.version = "19.0.0-www-classic-778e1ed2-20240926";
20042004
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
20052005
"function" ===
20062006
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,7 @@ __DEV__ &&
19801980
exports.useTransition = function () {
19811981
return resolveDispatcher().useTransition();
19821982
};
1983-
exports.version = "19.0.0-www-modern-0f1856c4-20240925";
1983+
exports.version = "19.0.0-www-modern-778e1ed2-20240926";
19841984
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
19851985
"function" ===
19861986
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
665665
exports.useTransition = function () {
666666
return ReactSharedInternals.H.useTransition();
667667
};
668-
exports.version = "19.0.0-www-classic-0f1856c4-20240925";
668+
exports.version = "19.0.0-www-classic-778e1ed2-20240926";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,4 +665,4 @@ exports.useSyncExternalStore = function (
665665
exports.useTransition = function () {
666666
return ReactSharedInternals.H.useTransition();
667667
};
668-
exports.version = "19.0.0-www-modern-0f1856c4-20240925";
668+
exports.version = "19.0.0-www-modern-778e1ed2-20240926";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
669669
exports.useTransition = function () {
670670
return ReactSharedInternals.H.useTransition();
671671
};
672-
exports.version = "19.0.0-www-classic-0f1856c4-20240925";
672+
exports.version = "19.0.0-www-classic-778e1ed2-20240926";
673673
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
674674
"function" ===
675675
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ exports.useSyncExternalStore = function (
669669
exports.useTransition = function () {
670670
return ReactSharedInternals.H.useTransition();
671671
};
672-
exports.version = "19.0.0-www-modern-0f1856c4-20240925";
672+
exports.version = "19.0.0-www-modern-778e1ed2-20240926";
673673
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
674674
"function" ===
675675
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 57 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -12611,20 +12611,38 @@ __DEV__ &&
1261112611
}
1261212612
shouldTimeSlice.finishedWork = forceSync;
1261312613
shouldTimeSlice.finishedLanes = lanes;
12614-
if (null !== ReactSharedInternals.actQueue)
12615-
commitRoot(
12616-
shouldTimeSlice,
12617-
workInProgressRootRecoverableErrors,
12618-
workInProgressTransitions,
12619-
workInProgressRootDidIncludeRecursiveRenderUpdate,
12620-
workInProgressDeferredLane,
12621-
workInProgressRootInterleavedUpdatedLanes,
12622-
workInProgressSuspendedRetryLanes,
12623-
IMMEDIATE_COMMIT,
12624-
-0,
12625-
0
12626-
);
12627-
else {
12614+
if (null !== ReactSharedInternals.actQueue) {
12615+
lanes = shouldTimeSlice;
12616+
forceSync = workInProgressRootRecoverableErrors;
12617+
shouldTimeSlice = workInProgressTransitions;
12618+
exitStatus = workInProgressRootDidIncludeRecursiveRenderUpdate;
12619+
renderWasConcurrent = workInProgressDeferredLane;
12620+
lanesThatJustErrored = workInProgressRootInterleavedUpdatedLanes;
12621+
originallyAttemptedLanes = workInProgressSuspendedRetryLanes;
12622+
var suspendedCommitReason = IMMEDIATE_COMMIT,
12623+
prevTransition = ReactSharedInternals.T,
12624+
previousUpdateLanePriority = currentUpdatePriority;
12625+
try {
12626+
(currentUpdatePriority = DiscreteEventPriority),
12627+
(ReactSharedInternals.T = null),
12628+
commitRootImpl(
12629+
lanes,
12630+
forceSync,
12631+
shouldTimeSlice,
12632+
exitStatus,
12633+
previousUpdateLanePriority,
12634+
renderWasConcurrent,
12635+
lanesThatJustErrored,
12636+
originallyAttemptedLanes,
12637+
suspendedCommitReason,
12638+
-0,
12639+
0
12640+
);
12641+
} finally {
12642+
(ReactSharedInternals.T = prevTransition),
12643+
(currentUpdatePriority = previousUpdateLanePriority);
12644+
}
12645+
} else {
1262812646
if (
1262912647
(lanes & 62914560) === lanes &&
1263012648
(alwaysThrottleRetries || exitStatus === RootSuspended) &&
@@ -12710,18 +12728,28 @@ __DEV__ &&
1271012728
lanes = finishedWork.subtreeFlags;
1271112729
(lanes & 8192 || 16785408 === (lanes & 16785408)) &&
1271212730
accumulateSuspenseyCommitOnFiber(finishedWork);
12713-
commitRoot(
12714-
root,
12715-
recoverableErrors,
12716-
transitions,
12717-
didIncludeRenderPhaseUpdate,
12718-
spawnedLane,
12719-
updatedLanes,
12720-
suspendedRetryLanes,
12721-
suspendedCommitReason,
12722-
completedRenderStartTime,
12723-
completedRenderEndTime
12724-
);
12731+
finishedWork = ReactSharedInternals.T;
12732+
lanes = currentUpdatePriority;
12733+
try {
12734+
(currentUpdatePriority = DiscreteEventPriority),
12735+
(ReactSharedInternals.T = null),
12736+
commitRootImpl(
12737+
root,
12738+
recoverableErrors,
12739+
transitions,
12740+
didIncludeRenderPhaseUpdate,
12741+
lanes,
12742+
spawnedLane,
12743+
updatedLanes,
12744+
suspendedRetryLanes,
12745+
suspendedCommitReason,
12746+
completedRenderStartTime,
12747+
completedRenderEndTime
12748+
);
12749+
} finally {
12750+
(ReactSharedInternals.T = finishedWork),
12751+
(currentUpdatePriority = lanes);
12752+
}
1272512753
}
1272612754
function isRenderConsistentWithExternalStores(finishedWork) {
1272712755
for (var node = finishedWork; ; ) {
@@ -13448,42 +13476,6 @@ __DEV__ &&
1344813476
workInProgressRootExitStatus = RootDidNotComplete;
1344913477
workInProgress = null;
1345013478
}
13451-
function commitRoot(
13452-
root,
13453-
recoverableErrors,
13454-
transitions,
13455-
didIncludeRenderPhaseUpdate,
13456-
spawnedLane,
13457-
updatedLanes,
13458-
suspendedRetryLanes,
13459-
suspendedCommitReason,
13460-
completedRenderStartTime,
13461-
completedRenderEndTime
13462-
) {
13463-
var prevTransition = ReactSharedInternals.T,
13464-
previousUpdateLanePriority = currentUpdatePriority;
13465-
try {
13466-
(currentUpdatePriority = DiscreteEventPriority),
13467-
(ReactSharedInternals.T = null),
13468-
commitRootImpl(
13469-
root,
13470-
recoverableErrors,
13471-
transitions,
13472-
didIncludeRenderPhaseUpdate,
13473-
previousUpdateLanePriority,
13474-
spawnedLane,
13475-
updatedLanes,
13476-
suspendedRetryLanes,
13477-
suspendedCommitReason,
13478-
completedRenderStartTime,
13479-
completedRenderEndTime
13480-
);
13481-
} finally {
13482-
(ReactSharedInternals.T = prevTransition),
13483-
(currentUpdatePriority = previousUpdateLanePriority);
13484-
}
13485-
return null;
13486-
}
1348713479
function commitRootImpl(
1348813480
root,
1348913481
recoverableErrors,
@@ -17040,11 +17032,11 @@ __DEV__ &&
1704017032
(function () {
1704117033
var internals = {
1704217034
bundleType: 1,
17043-
version: "19.0.0-www-classic-0f1856c4-20240925",
17035+
version: "19.0.0-www-classic-778e1ed2-20240926",
1704417036
rendererPackageName: "react-art",
1704517037
currentDispatcherRef: ReactSharedInternals,
1704617038
findFiberByHostInstance: getInstanceFromNode,
17047-
reconcilerVersion: "19.0.0-www-classic-0f1856c4-20240925"
17039+
reconcilerVersion: "19.0.0-www-classic-778e1ed2-20240926"
1704817040
};
1704917041
internals.overrideHookState = overrideHookState;
1705017042
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17078,7 +17070,7 @@ __DEV__ &&
1707817070
exports.Shape = Shape;
1707917071
exports.Surface = Surface;
1708017072
exports.Text = Text;
17081-
exports.version = "19.0.0-www-classic-0f1856c4-20240925";
17073+
exports.version = "19.0.0-www-classic-778e1ed2-20240926";
1708217074
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1708317075
"function" ===
1708417076
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 57 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -12156,20 +12156,38 @@ __DEV__ &&
1215612156
}
1215712157
shouldTimeSlice.finishedWork = forceSync;
1215812158
shouldTimeSlice.finishedLanes = lanes;
12159-
if (null !== ReactSharedInternals.actQueue)
12160-
commitRoot(
12161-
shouldTimeSlice,
12162-
workInProgressRootRecoverableErrors,
12163-
workInProgressTransitions,
12164-
workInProgressRootDidIncludeRecursiveRenderUpdate,
12165-
workInProgressDeferredLane,
12166-
workInProgressRootInterleavedUpdatedLanes,
12167-
workInProgressSuspendedRetryLanes,
12168-
IMMEDIATE_COMMIT,
12169-
-0,
12170-
0
12171-
);
12172-
else {
12159+
if (null !== ReactSharedInternals.actQueue) {
12160+
lanes = shouldTimeSlice;
12161+
forceSync = workInProgressRootRecoverableErrors;
12162+
shouldTimeSlice = workInProgressTransitions;
12163+
exitStatus = workInProgressRootDidIncludeRecursiveRenderUpdate;
12164+
renderWasConcurrent = workInProgressDeferredLane;
12165+
lanesThatJustErrored = workInProgressRootInterleavedUpdatedLanes;
12166+
originallyAttemptedLanes = workInProgressSuspendedRetryLanes;
12167+
var suspendedCommitReason = IMMEDIATE_COMMIT,
12168+
prevTransition = ReactSharedInternals.T,
12169+
previousUpdateLanePriority = currentUpdatePriority;
12170+
try {
12171+
(currentUpdatePriority = DiscreteEventPriority),
12172+
(ReactSharedInternals.T = null),
12173+
commitRootImpl(
12174+
lanes,
12175+
forceSync,
12176+
shouldTimeSlice,
12177+
exitStatus,
12178+
previousUpdateLanePriority,
12179+
renderWasConcurrent,
12180+
lanesThatJustErrored,
12181+
originallyAttemptedLanes,
12182+
suspendedCommitReason,
12183+
-0,
12184+
0
12185+
);
12186+
} finally {
12187+
(ReactSharedInternals.T = prevTransition),
12188+
(currentUpdatePriority = previousUpdateLanePriority);
12189+
}
12190+
} else {
1217312191
if (
1217412192
(lanes & 62914560) === lanes &&
1217512193
(alwaysThrottleRetries || exitStatus === RootSuspended) &&
@@ -12255,18 +12273,28 @@ __DEV__ &&
1225512273
lanes = finishedWork.subtreeFlags;
1225612274
(lanes & 8192 || 16785408 === (lanes & 16785408)) &&
1225712275
accumulateSuspenseyCommitOnFiber(finishedWork);
12258-
commitRoot(
12259-
root,
12260-
recoverableErrors,
12261-
transitions,
12262-
didIncludeRenderPhaseUpdate,
12263-
spawnedLane,
12264-
updatedLanes,
12265-
suspendedRetryLanes,
12266-
suspendedCommitReason,
12267-
completedRenderStartTime,
12268-
completedRenderEndTime
12269-
);
12276+
finishedWork = ReactSharedInternals.T;
12277+
lanes = currentUpdatePriority;
12278+
try {
12279+
(currentUpdatePriority = DiscreteEventPriority),
12280+
(ReactSharedInternals.T = null),
12281+
commitRootImpl(
12282+
root,
12283+
recoverableErrors,
12284+
transitions,
12285+
didIncludeRenderPhaseUpdate,
12286+
lanes,
12287+
spawnedLane,
12288+
updatedLanes,
12289+
suspendedRetryLanes,
12290+
suspendedCommitReason,
12291+
completedRenderStartTime,
12292+
completedRenderEndTime
12293+
);
12294+
} finally {
12295+
(ReactSharedInternals.T = finishedWork),
12296+
(currentUpdatePriority = lanes);
12297+
}
1227012298
}
1227112299
function isRenderConsistentWithExternalStores(finishedWork) {
1227212300
for (var node = finishedWork; ; ) {
@@ -12989,42 +13017,6 @@ __DEV__ &&
1298913017
workInProgressRootExitStatus = RootDidNotComplete;
1299013018
workInProgress = null;
1299113019
}
12992-
function commitRoot(
12993-
root,
12994-
recoverableErrors,
12995-
transitions,
12996-
didIncludeRenderPhaseUpdate,
12997-
spawnedLane,
12998-
updatedLanes,
12999-
suspendedRetryLanes,
13000-
suspendedCommitReason,
13001-
completedRenderStartTime,
13002-
completedRenderEndTime
13003-
) {
13004-
var prevTransition = ReactSharedInternals.T,
13005-
previousUpdateLanePriority = currentUpdatePriority;
13006-
try {
13007-
(currentUpdatePriority = DiscreteEventPriority),
13008-
(ReactSharedInternals.T = null),
13009-
commitRootImpl(
13010-
root,
13011-
recoverableErrors,
13012-
transitions,
13013-
didIncludeRenderPhaseUpdate,
13014-
previousUpdateLanePriority,
13015-
spawnedLane,
13016-
updatedLanes,
13017-
suspendedRetryLanes,
13018-
suspendedCommitReason,
13019-
completedRenderStartTime,
13020-
completedRenderEndTime
13021-
);
13022-
} finally {
13023-
(ReactSharedInternals.T = prevTransition),
13024-
(currentUpdatePriority = previousUpdateLanePriority);
13025-
}
13026-
return null;
13027-
}
1302813020
function commitRootImpl(
1302913021
root,
1303013022
recoverableErrors,
@@ -16483,11 +16475,11 @@ __DEV__ &&
1648316475
(function () {
1648416476
var internals = {
1648516477
bundleType: 1,
16486-
version: "19.0.0-www-modern-0f1856c4-20240925",
16478+
version: "19.0.0-www-modern-778e1ed2-20240926",
1648716479
rendererPackageName: "react-art",
1648816480
currentDispatcherRef: ReactSharedInternals,
1648916481
findFiberByHostInstance: getInstanceFromNode,
16490-
reconcilerVersion: "19.0.0-www-modern-0f1856c4-20240925"
16482+
reconcilerVersion: "19.0.0-www-modern-778e1ed2-20240926"
1649116483
};
1649216484
internals.overrideHookState = overrideHookState;
1649316485
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16521,7 +16513,7 @@ __DEV__ &&
1652116513
exports.Shape = Shape;
1652216514
exports.Surface = Surface;
1652316515
exports.Text = Text;
16524-
exports.version = "19.0.0-www-modern-0f1856c4-20240925";
16516+
exports.version = "19.0.0-www-modern-778e1ed2-20240926";
1652516517
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1652616518
"function" ===
1652716519
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)