@@ -27,7 +27,6 @@ import {
27
27
transitionLaneExpirationMs ,
28
28
retryLaneExpirationMs ,
29
29
disableLegacyMode ,
30
- enableSiblingPrerendering ,
31
30
} from 'shared/ReactFeatureFlags' ;
32
31
import { isDevToolsPresent } from './ReactFiberDevToolsHook' ;
33
32
import { clz32 } from './clz32' ;
@@ -271,13 +270,11 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes {
271
270
if ( nonIdlePingedLanes !== NoLanes ) {
272
271
nextLanes = getHighestPriorityLanes ( nonIdlePingedLanes ) ;
273
272
} else {
274
- if ( enableSiblingPrerendering ) {
275
- // Nothing has been pinged. Check for lanes that need to be prewarmed.
276
- if ( ! rootHasPendingCommit ) {
277
- const lanesToPrewarm = nonIdlePendingLanes & ~ warmLanes ;
278
- if ( lanesToPrewarm !== NoLanes ) {
279
- nextLanes = getHighestPriorityLanes ( lanesToPrewarm ) ;
280
- }
273
+ // Nothing has been pinged. Check for lanes that need to be prewarmed.
274
+ if ( ! rootHasPendingCommit ) {
275
+ const lanesToPrewarm = nonIdlePendingLanes & ~ warmLanes ;
276
+ if ( lanesToPrewarm !== NoLanes ) {
277
+ nextLanes = getHighestPriorityLanes ( lanesToPrewarm ) ;
281
278
}
282
279
}
283
280
}
@@ -297,13 +294,11 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes {
297
294
if ( pingedLanes !== NoLanes ) {
298
295
nextLanes = getHighestPriorityLanes ( pingedLanes ) ;
299
296
} else {
300
- if ( enableSiblingPrerendering ) {
301
- // Nothing has been pinged. Check for lanes that need to be prewarmed.
302
- if ( ! rootHasPendingCommit ) {
303
- const lanesToPrewarm = pendingLanes & ~ warmLanes ;
304
- if ( lanesToPrewarm !== NoLanes ) {
305
- nextLanes = getHighestPriorityLanes ( lanesToPrewarm ) ;
306
- }
297
+ // Nothing has been pinged. Check for lanes that need to be prewarmed.
298
+ if ( ! rootHasPendingCommit ) {
299
+ const lanesToPrewarm = pendingLanes & ~ warmLanes ;
300
+ if ( lanesToPrewarm !== NoLanes ) {
301
+ nextLanes = getHighestPriorityLanes ( lanesToPrewarm ) ;
307
302
}
308
303
}
309
304
}
@@ -765,14 +760,12 @@ export function markRootSuspended(
765
760
root : FiberRoot ,
766
761
suspendedLanes : Lanes ,
767
762
spawnedLane : Lane ,
768
- didAttemptEntireTree : boolean ,
763
+ didSkipSuspendedSiblings : boolean ,
769
764
) {
770
- // TODO: Split this into separate functions for marking the root at the end of
771
- // a render attempt versus suspending while the root is still in progress.
772
765
root . suspendedLanes |= suspendedLanes ;
773
766
root . pingedLanes &= ~ suspendedLanes ;
774
767
775
- if ( enableSiblingPrerendering && didAttemptEntireTree ) {
768
+ if ( ! didSkipSuspendedSiblings ) {
776
769
// Mark these lanes as warm so we know there's nothing else to work on.
777
770
root . warmLanes |= suspendedLanes ;
778
771
} else {
@@ -883,7 +876,6 @@ export function markRootFinished(
883
876
// suspended) instead of the regular mode (i.e. unwind and skip the siblings
884
877
// as soon as something suspends to unblock the rest of the update).
885
878
if (
886
- enableSiblingPrerendering &&
887
879
suspendedRetryLanes !== NoLanes &&
888
880
// Note that we only do this if there were no updates since we started
889
881
// rendering. This mirrors the logic in markRootUpdated — whenever we
0 commit comments