@@ -18,7 +18,6 @@ import {
18
18
disableSchedulerTimeoutInWorkLoop ,
19
19
enableProfilerTimer ,
20
20
enableProfilerNestedUpdatePhase ,
21
- enableSiblingPrerendering ,
22
21
} from 'shared/ReactFeatureFlags' ;
23
22
import {
24
23
NoLane ,
@@ -30,7 +29,6 @@ import {
30
29
markStarvedLanesAsExpired ,
31
30
claimNextTransitionLane ,
32
31
getNextLanesToFlushSync ,
33
- checkIfRootIsPrerendering ,
34
32
} from './ReactFiberLane' ;
35
33
import {
36
34
CommitContext ,
@@ -208,10 +206,7 @@ function flushSyncWorkAcrossRoots_impl(
208
206
? workInProgressRootRenderLanes
209
207
: NoLanes ,
210
208
) ;
211
- if (
212
- includesSyncLane ( nextLanes ) &&
213
- ! checkIfRootIsPrerendering ( root , nextLanes )
214
- ) {
209
+ if ( includesSyncLane ( nextLanes ) ) {
215
210
// This root has pending sync work. Flush it now.
216
211
didPerformSomeWork = true ;
217
212
performSyncWorkOnRoot ( root , nextLanes ) ;
@@ -346,13 +341,7 @@ function scheduleTaskForRootDuringMicrotask(
346
341
}
347
342
348
343
// Schedule a new callback in the host environment.
349
- if (
350
- includesSyncLane ( nextLanes ) &&
351
- // If we're prerendering, then we should use the concurrent work loop
352
- // even if the lanes are synchronous, so that prerendering never blocks
353
- // the main thread.
354
- ! ( enableSiblingPrerendering && checkIfRootIsPrerendering ( root , nextLanes ) )
355
- ) {
344
+ if ( includesSyncLane ( nextLanes ) ) {
356
345
// Synchronous work is always flushed at the end of the microtask, so we
357
346
// don't need to schedule an additional task.
358
347
if ( existingCallbackNode !== null ) {
@@ -386,10 +375,9 @@ function scheduleTaskForRootDuringMicrotask(
386
375
387
376
let schedulerPriorityLevel ;
388
377
switch ( lanesToEventPriority ( nextLanes ) ) {
389
- // Scheduler does have an "ImmediatePriority", but now that we use
390
- // microtasks for sync work we no longer use that. Any sync work that
391
- // reaches this path is meant to be time sliced.
392
378
case DiscreteEventPriority :
379
+ schedulerPriorityLevel = ImmediateSchedulerPriority ;
380
+ break ;
393
381
case ContinuousEventPriority :
394
382
schedulerPriorityLevel = UserBlockingSchedulerPriority ;
395
383
break ;
0 commit comments