@@ -27,7 +27,6 @@ import {
2727 transitionLaneExpirationMs ,
2828 retryLaneExpirationMs ,
2929 disableLegacyMode ,
30- enableSiblingPrerendering ,
3130} from 'shared/ReactFeatureFlags' ;
3231import { isDevToolsPresent } from './ReactFiberDevToolsHook' ;
3332import { clz32 } from './clz32' ;
@@ -271,13 +270,11 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes {
271270 if ( nonIdlePingedLanes !== NoLanes ) {
272271 nextLanes = getHighestPriorityLanes ( nonIdlePingedLanes ) ;
273272 } 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 ) ;
281278 }
282279 }
283280 }
@@ -297,13 +294,11 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes {
297294 if ( pingedLanes !== NoLanes ) {
298295 nextLanes = getHighestPriorityLanes ( pingedLanes ) ;
299296 } 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 ) ;
307302 }
308303 }
309304 }
@@ -765,14 +760,12 @@ export function markRootSuspended(
765760 root : FiberRoot ,
766761 suspendedLanes : Lanes ,
767762 spawnedLane : Lane ,
768- didAttemptEntireTree : boolean ,
763+ didSkipSuspendedSiblings : boolean ,
769764) {
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.
772765 root . suspendedLanes |= suspendedLanes ;
773766 root . pingedLanes &= ~ suspendedLanes ;
774767
775- if ( enableSiblingPrerendering && didAttemptEntireTree ) {
768+ if ( ! didSkipSuspendedSiblings ) {
776769 // Mark these lanes as warm so we know there's nothing else to work on.
777770 root . warmLanes |= suspendedLanes ;
778771 } else {
@@ -883,7 +876,6 @@ export function markRootFinished(
883876 // suspended) instead of the regular mode (i.e. unwind and skip the siblings
884877 // as soon as something suspends to unblock the rest of the update).
885878 if (
886- enableSiblingPrerendering &&
887879 suspendedRetryLanes !== NoLanes &&
888880 // Note that we only do this if there were no updates since we started
889881 // rendering. This mirrors the logic in markRootUpdated — whenever we
0 commit comments