@@ -367,20 +367,6 @@ export function computeExpirationForFiber(
367
367
return expirationTime ;
368
368
}
369
369
370
- let lastUniqueAsyncExpiration = NoWork ;
371
- export function computeUniqueAsyncExpiration ( ) : ExpirationTime {
372
- const currentTime = requestCurrentTime ( ) ;
373
- let result = computeAsyncExpiration ( currentTime ) ;
374
- if ( result <= lastUniqueAsyncExpiration ) {
375
- // Since we assume the current time monotonically increases, we only hit
376
- // this branch when computeUniqueAsyncExpiration is fired multiple times
377
- // within a 200ms window (or whatever the async bucket size is).
378
- result -= 1 ;
379
- }
380
- lastUniqueAsyncExpiration = result ;
381
- return result ;
382
- }
383
-
384
370
export function scheduleUpdateOnFiber (
385
371
fiber : Fiber ,
386
372
expirationTime : ExpirationTime ,
@@ -1080,16 +1066,11 @@ function finishSyncRender(root, exitStatus, expirationTime) {
1080
1066
}
1081
1067
1082
1068
export function flushRoot ( root : FiberRoot , expirationTime : ExpirationTime ) {
1083
- if ( ( executionContext & ( RenderContext | CommitContext ) ) !== NoContext ) {
1084
- invariant (
1085
- false ,
1086
- 'work.commit(): Cannot commit while already rendering. This likely ' +
1087
- 'means you attempted to commit from inside a lifecycle method.' ,
1088
- ) ;
1089
- }
1090
1069
markRootExpiredAtTime ( root , expirationTime ) ;
1091
1070
ensureRootIsScheduled ( root ) ;
1092
- flushSyncCallbackQueue ( ) ;
1071
+ if ( ( executionContext & ( RenderContext | CommitContext ) ) === NoContext ) {
1072
+ flushSyncCallbackQueue ( ) ;
1073
+ }
1093
1074
}
1094
1075
1095
1076
export function flushDiscreteUpdates ( ) {
0 commit comments