Skip to content

Commit 06cc3b9

Browse files
committed
Log Render Phases that Never Committed (#31548)
This includes: - `Interrupted Render`: Interrupted Renders (setState or ping at higher priority) - `Prewarm`: Suspended Renders outside a Suspense boundary (RootSuspendedWithDelay/RootSuspendedAtTheShell) - `Errored Render`: Render that errored somewhere in the tree (Fatal or Not) (which may or may not be retried and then complete) - `Teared Render`: Due to useSyncExternalStore not matching (which will do another sync attempt) Suspended Commit: <img width="893" alt="Screenshot 2024-11-14 at 11 47 40 PM" src="https://github.com/user-attachments/assets/b25a6a8b-a5e9-4d66-b325-57aef4bf9dad"> Errored with a second recovery attempt that also errors: <img width="976" alt="Screenshot 2024-11-15 at 12 09 06 AM" src="https://github.com/user-attachments/assets/9ce52cbb-b587-4f1e-8b67-e51d9073ae5b"> DiffTrain build for [3720870](3720870)
1 parent fcb79ce commit 06cc3b9

34 files changed

+370
-226
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8a41d6ceab8af642d8ab9ed04fc744a699f4ac09
1+
3720870a979b48a1ea8776f64a190878b8558f2b
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8a41d6ceab8af642d8ab9ed04fc744a699f4ac09
1+
3720870a979b48a1ea8776f64a190878b8558f2b

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1819,7 +1819,7 @@ __DEV__ &&
18191819
exports.useTransition = function () {
18201820
return resolveDispatcher().useTransition();
18211821
};
1822-
exports.version = "19.0.0-www-classic-8a41d6ce-20241114";
1822+
exports.version = "19.0.0-www-classic-3720870a-20241115";
18231823
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
18241824
"function" ===
18251825
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
@@ -1819,7 +1819,7 @@ __DEV__ &&
18191819
exports.useTransition = function () {
18201820
return resolveDispatcher().useTransition();
18211821
};
1822-
exports.version = "19.0.0-www-modern-8a41d6ce-20241114";
1822+
exports.version = "19.0.0-www-modern-3720870a-20241115";
18231823
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
18241824
"function" ===
18251825
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
@@ -619,4 +619,4 @@ exports.useSyncExternalStore = function (
619619
exports.useTransition = function () {
620620
return ReactSharedInternals.H.useTransition();
621621
};
622-
exports.version = "19.0.0-www-classic-8a41d6ce-20241114";
622+
exports.version = "19.0.0-www-classic-3720870a-20241115";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,4 +619,4 @@ exports.useSyncExternalStore = function (
619619
exports.useTransition = function () {
620620
return ReactSharedInternals.H.useTransition();
621621
};
622-
exports.version = "19.0.0-www-modern-8a41d6ce-20241114";
622+
exports.version = "19.0.0-www-modern-3720870a-20241115";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ exports.useSyncExternalStore = function (
623623
exports.useTransition = function () {
624624
return ReactSharedInternals.H.useTransition();
625625
};
626-
exports.version = "19.0.0-www-classic-8a41d6ce-20241114";
626+
exports.version = "19.0.0-www-classic-3720870a-20241115";
627627
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
628628
"function" ===
629629
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
@@ -623,7 +623,7 @@ exports.useSyncExternalStore = function (
623623
exports.useTransition = function () {
624624
return ReactSharedInternals.H.useTransition();
625625
};
626-
exports.version = "19.0.0-www-modern-8a41d6ce-20241114";
626+
exports.version = "19.0.0-www-modern-3720870a-20241115";
627627
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
628628
"function" ===
629629
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12321,16 +12321,17 @@ __DEV__ &&
1232112321
break;
1232212322
}
1232312323
a: {
12324-
shouldTimeSlice = root;
12325-
switch (exitStatus) {
12324+
renderWasConcurrent = root;
12325+
shouldTimeSlice = exitStatus;
12326+
switch (shouldTimeSlice) {
1232612327
case RootInProgress:
1232712328
case RootFatalErrored:
1232812329
throw Error("Root did not complete. This is a bug in React.");
1232912330
case RootSuspendedWithDelay:
1233012331
if ((lanes & 4194176) !== lanes) break;
1233112332
case RootSuspendedAtTheShell:
1233212333
markRootSuspended(
12333-
shouldTimeSlice,
12334+
renderWasConcurrent,
1233412335
lanes,
1233512336
workInProgressDeferredLane,
1233612337
!workInProgressRootDidSkipSuspendedSiblings
@@ -12345,17 +12346,19 @@ __DEV__ &&
1234512346
default:
1234612347
throw Error("Unknown root exit status.");
1234712348
}
12348-
shouldTimeSlice.finishedWork = forceSync;
12349-
shouldTimeSlice.finishedLanes = lanes;
12349+
renderWasConcurrent.finishedWork = forceSync;
12350+
renderWasConcurrent.finishedLanes = lanes;
1235012351
if (null !== ReactSharedInternals.actQueue) {
12351-
lanes = shouldTimeSlice;
12352+
lanes = renderWasConcurrent;
1235212353
forceSync = workInProgressRootRecoverableErrors;
12353-
shouldTimeSlice = workInProgressTransitions;
12354-
exitStatus = workInProgressRootDidIncludeRecursiveRenderUpdate;
12355-
renderWasConcurrent = workInProgressDeferredLane;
12356-
lanesThatJustErrored = workInProgressRootInterleavedUpdatedLanes;
12357-
originallyAttemptedLanes = workInProgressSuspendedRetryLanes;
12358-
var suspendedCommitReason = IMMEDIATE_COMMIT,
12354+
exitStatus = workInProgressTransitions;
12355+
renderWasConcurrent =
12356+
workInProgressRootDidIncludeRecursiveRenderUpdate;
12357+
lanesThatJustErrored = workInProgressDeferredLane;
12358+
originallyAttemptedLanes =
12359+
workInProgressRootInterleavedUpdatedLanes;
12360+
var suspendedRetryLanes = workInProgressSuspendedRetryLanes,
12361+
suspendedCommitReason = IMMEDIATE_COMMIT,
1235912362
prevTransition = ReactSharedInternals.T,
1236012363
previousUpdateLanePriority = currentUpdatePriority;
1236112364
try {
@@ -12364,12 +12367,13 @@ __DEV__ &&
1236412367
commitRootImpl(
1236512368
lanes,
1236612369
forceSync,
12367-
shouldTimeSlice,
1236812370
exitStatus,
12369-
previousUpdateLanePriority,
1237012371
renderWasConcurrent,
12372+
previousUpdateLanePriority,
1237112373
lanesThatJustErrored,
1237212374
originallyAttemptedLanes,
12375+
suspendedRetryLanes,
12376+
shouldTimeSlice,
1237312377
suspendedCommitReason,
1237412378
-0,
1237512379
0
@@ -12381,24 +12385,24 @@ __DEV__ &&
1238112385
} else {
1238212386
if (
1238312387
(lanes & 62914560) === lanes &&
12384-
(alwaysThrottleRetries || exitStatus === RootSuspended) &&
12388+
(alwaysThrottleRetries || shouldTimeSlice === RootSuspended) &&
1238512389
((exitStatus =
1238612390
globalMostRecentFallbackTime +
1238712391
FALLBACK_THROTTLE_MS -
1238812392
now$1()),
1238912393
10 < exitStatus)
1239012394
) {
1239112395
markRootSuspended(
12392-
shouldTimeSlice,
12396+
renderWasConcurrent,
1239312397
lanes,
1239412398
workInProgressDeferredLane,
1239512399
!workInProgressRootDidSkipSuspendedSiblings
1239612400
);
12397-
if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
12398-
shouldTimeSlice.timeoutHandle = scheduleTimeout(
12401+
if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;
12402+
renderWasConcurrent.timeoutHandle = scheduleTimeout(
1239912403
commitRootWhenReady.bind(
1240012404
null,
12401-
shouldTimeSlice,
12405+
renderWasConcurrent,
1240212406
forceSync,
1240312407
workInProgressRootRecoverableErrors,
1240412408
workInProgressTransitions,
@@ -12408,6 +12412,7 @@ __DEV__ &&
1240812412
workInProgressRootInterleavedUpdatedLanes,
1240912413
workInProgressSuspendedRetryLanes,
1241012414
workInProgressRootDidSkipSuspendedSiblings,
12415+
shouldTimeSlice,
1241112416
THROTTLED_COMMIT,
1241212417
-0,
1241312418
0
@@ -12417,7 +12422,7 @@ __DEV__ &&
1241712422
break a;
1241812423
}
1241912424
commitRootWhenReady(
12420-
shouldTimeSlice,
12425+
renderWasConcurrent,
1242112426
forceSync,
1242212427
workInProgressRootRecoverableErrors,
1242312428
workInProgressTransitions,
@@ -12427,6 +12432,7 @@ __DEV__ &&
1242712432
workInProgressRootInterleavedUpdatedLanes,
1242812433
workInProgressSuspendedRetryLanes,
1242912434
workInProgressRootDidSkipSuspendedSiblings,
12435+
shouldTimeSlice,
1243012436
IMMEDIATE_COMMIT,
1243112437
-0,
1243212438
0
@@ -12457,6 +12463,7 @@ __DEV__ &&
1245712463
updatedLanes,
1245812464
suspendedRetryLanes,
1245912465
didSkipSuspendedSiblings,
12466+
exitStatus,
1246012467
suspendedCommitReason,
1246112468
completedRenderStartTime,
1246212469
completedRenderEndTime
@@ -12478,6 +12485,7 @@ __DEV__ &&
1247812485
spawnedLane,
1247912486
updatedLanes,
1248012487
suspendedRetryLanes,
12488+
exitStatus,
1248112489
suspendedCommitReason,
1248212490
completedRenderStartTime,
1248312491
completedRenderEndTime
@@ -16709,11 +16717,11 @@ __DEV__ &&
1670916717
(function () {
1671016718
var internals = {
1671116719
bundleType: 1,
16712-
version: "19.0.0-www-classic-8a41d6ce-20241114",
16720+
version: "19.0.0-www-classic-3720870a-20241115",
1671316721
rendererPackageName: "react-art",
1671416722
currentDispatcherRef: ReactSharedInternals,
1671516723
findFiberByHostInstance: getInstanceFromNode,
16716-
reconcilerVersion: "19.0.0-www-classic-8a41d6ce-20241114"
16724+
reconcilerVersion: "19.0.0-www-classic-3720870a-20241115"
1671716725
};
1671816726
internals.overrideHookState = overrideHookState;
1671916727
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16747,7 +16755,7 @@ __DEV__ &&
1674716755
exports.Shape = Shape;
1674816756
exports.Surface = Surface;
1674916757
exports.Text = Text;
16750-
exports.version = "19.0.0-www-classic-8a41d6ce-20241114";
16758+
exports.version = "19.0.0-www-classic-3720870a-20241115";
1675116759
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1675216760
"function" ===
1675316761
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

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

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12125,16 +12125,17 @@ __DEV__ &&
1212512125
break;
1212612126
}
1212712127
a: {
12128-
shouldTimeSlice = root;
12129-
switch (exitStatus) {
12128+
renderWasConcurrent = root;
12129+
shouldTimeSlice = exitStatus;
12130+
switch (shouldTimeSlice) {
1213012131
case RootInProgress:
1213112132
case RootFatalErrored:
1213212133
throw Error("Root did not complete. This is a bug in React.");
1213312134
case RootSuspendedWithDelay:
1213412135
if ((lanes & 4194176) !== lanes) break;
1213512136
case RootSuspendedAtTheShell:
1213612137
markRootSuspended(
12137-
shouldTimeSlice,
12138+
renderWasConcurrent,
1213812139
lanes,
1213912140
workInProgressDeferredLane,
1214012141
!workInProgressRootDidSkipSuspendedSiblings
@@ -12149,17 +12150,19 @@ __DEV__ &&
1214912150
default:
1215012151
throw Error("Unknown root exit status.");
1215112152
}
12152-
shouldTimeSlice.finishedWork = forceSync;
12153-
shouldTimeSlice.finishedLanes = lanes;
12153+
renderWasConcurrent.finishedWork = forceSync;
12154+
renderWasConcurrent.finishedLanes = lanes;
1215412155
if (null !== ReactSharedInternals.actQueue) {
12155-
lanes = shouldTimeSlice;
12156+
lanes = renderWasConcurrent;
1215612157
forceSync = workInProgressRootRecoverableErrors;
12157-
shouldTimeSlice = workInProgressTransitions;
12158-
exitStatus = workInProgressRootDidIncludeRecursiveRenderUpdate;
12159-
renderWasConcurrent = workInProgressDeferredLane;
12160-
lanesThatJustErrored = workInProgressRootInterleavedUpdatedLanes;
12161-
originallyAttemptedLanes = workInProgressSuspendedRetryLanes;
12162-
var suspendedCommitReason = IMMEDIATE_COMMIT,
12158+
exitStatus = workInProgressTransitions;
12159+
renderWasConcurrent =
12160+
workInProgressRootDidIncludeRecursiveRenderUpdate;
12161+
lanesThatJustErrored = workInProgressDeferredLane;
12162+
originallyAttemptedLanes =
12163+
workInProgressRootInterleavedUpdatedLanes;
12164+
var suspendedRetryLanes = workInProgressSuspendedRetryLanes,
12165+
suspendedCommitReason = IMMEDIATE_COMMIT,
1216312166
prevTransition = ReactSharedInternals.T,
1216412167
previousUpdateLanePriority = currentUpdatePriority;
1216512168
try {
@@ -12168,12 +12171,13 @@ __DEV__ &&
1216812171
commitRootImpl(
1216912172
lanes,
1217012173
forceSync,
12171-
shouldTimeSlice,
1217212174
exitStatus,
12173-
previousUpdateLanePriority,
1217412175
renderWasConcurrent,
12176+
previousUpdateLanePriority,
1217512177
lanesThatJustErrored,
1217612178
originallyAttemptedLanes,
12179+
suspendedRetryLanes,
12180+
shouldTimeSlice,
1217712181
suspendedCommitReason,
1217812182
-0,
1217912183
0
@@ -12185,24 +12189,24 @@ __DEV__ &&
1218512189
} else {
1218612190
if (
1218712191
(lanes & 62914560) === lanes &&
12188-
(alwaysThrottleRetries || exitStatus === RootSuspended) &&
12192+
(alwaysThrottleRetries || shouldTimeSlice === RootSuspended) &&
1218912193
((exitStatus =
1219012194
globalMostRecentFallbackTime +
1219112195
FALLBACK_THROTTLE_MS -
1219212196
now$1()),
1219312197
10 < exitStatus)
1219412198
) {
1219512199
markRootSuspended(
12196-
shouldTimeSlice,
12200+
renderWasConcurrent,
1219712201
lanes,
1219812202
workInProgressDeferredLane,
1219912203
!workInProgressRootDidSkipSuspendedSiblings
1220012204
);
12201-
if (0 !== getNextLanes(shouldTimeSlice, 0)) break a;
12202-
shouldTimeSlice.timeoutHandle = scheduleTimeout(
12205+
if (0 !== getNextLanes(renderWasConcurrent, 0)) break a;
12206+
renderWasConcurrent.timeoutHandle = scheduleTimeout(
1220312207
commitRootWhenReady.bind(
1220412208
null,
12205-
shouldTimeSlice,
12209+
renderWasConcurrent,
1220612210
forceSync,
1220712211
workInProgressRootRecoverableErrors,
1220812212
workInProgressTransitions,
@@ -12212,6 +12216,7 @@ __DEV__ &&
1221212216
workInProgressRootInterleavedUpdatedLanes,
1221312217
workInProgressSuspendedRetryLanes,
1221412218
workInProgressRootDidSkipSuspendedSiblings,
12219+
shouldTimeSlice,
1221512220
THROTTLED_COMMIT,
1221612221
-0,
1221712222
0
@@ -12221,7 +12226,7 @@ __DEV__ &&
1222112226
break a;
1222212227
}
1222312228
commitRootWhenReady(
12224-
shouldTimeSlice,
12229+
renderWasConcurrent,
1222512230
forceSync,
1222612231
workInProgressRootRecoverableErrors,
1222712232
workInProgressTransitions,
@@ -12231,6 +12236,7 @@ __DEV__ &&
1223112236
workInProgressRootInterleavedUpdatedLanes,
1223212237
workInProgressSuspendedRetryLanes,
1223312238
workInProgressRootDidSkipSuspendedSiblings,
12239+
shouldTimeSlice,
1223412240
IMMEDIATE_COMMIT,
1223512241
-0,
1223612242
0
@@ -12261,6 +12267,7 @@ __DEV__ &&
1226112267
updatedLanes,
1226212268
suspendedRetryLanes,
1226312269
didSkipSuspendedSiblings,
12270+
exitStatus,
1226412271
suspendedCommitReason,
1226512272
completedRenderStartTime,
1226612273
completedRenderEndTime
@@ -12282,6 +12289,7 @@ __DEV__ &&
1228212289
spawnedLane,
1228312290
updatedLanes,
1228412291
suspendedRetryLanes,
12292+
exitStatus,
1228512293
suspendedCommitReason,
1228612294
completedRenderStartTime,
1228712295
completedRenderEndTime
@@ -16472,11 +16480,11 @@ __DEV__ &&
1647216480
(function () {
1647316481
var internals = {
1647416482
bundleType: 1,
16475-
version: "19.0.0-www-modern-8a41d6ce-20241114",
16483+
version: "19.0.0-www-modern-3720870a-20241115",
1647616484
rendererPackageName: "react-art",
1647716485
currentDispatcherRef: ReactSharedInternals,
1647816486
findFiberByHostInstance: getInstanceFromNode,
16479-
reconcilerVersion: "19.0.0-www-modern-8a41d6ce-20241114"
16487+
reconcilerVersion: "19.0.0-www-modern-3720870a-20241115"
1648016488
};
1648116489
internals.overrideHookState = overrideHookState;
1648216490
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -16510,7 +16518,7 @@ __DEV__ &&
1651016518
exports.Shape = Shape;
1651116519
exports.Surface = Surface;
1651216520
exports.Text = Text;
16513-
exports.version = "19.0.0-www-modern-8a41d6ce-20241114";
16521+
exports.version = "19.0.0-www-modern-3720870a-20241115";
1651416522
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1651516523
"function" ===
1651616524
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)