@@ -41,7 +41,6 @@ import {
41
41
scheduleCallback ,
42
42
cancelCallback ,
43
43
getCurrentPriorityLevel ,
44
- runWithPriority ,
45
44
shouldYield ,
46
45
requestPaint ,
47
46
now ,
@@ -1124,7 +1123,7 @@ export function deferredUpdates<A>(fn: () => A): A {
1124
1123
const previousLanePriority = getCurrentUpdateLanePriority ( ) ;
1125
1124
try {
1126
1125
setCurrentUpdateLanePriority ( DefaultLanePriority ) ;
1127
- return runWithPriority ( NormalSchedulerPriority , fn ) ;
1126
+ return fn ( ) ;
1128
1127
} finally {
1129
1128
setCurrentUpdateLanePriority ( previousLanePriority ) ;
1130
1129
}
@@ -1176,7 +1175,7 @@ export function batchedEventUpdates<A, R>(fn: A => R, a: A): R {
1176
1175
}
1177
1176
1178
1177
export function discreteUpdates < A , B , C , D , R > (
1179
- fn : ( A , B , C ) = > R ,
1178
+ fn : ( A , B , C , D ) = > R ,
1180
1179
a : A ,
1181
1180
b : B ,
1182
1181
c : C ,
@@ -1188,10 +1187,7 @@ export function discreteUpdates<A, B, C, D, R>(
1188
1187
const previousLanePriority = getCurrentUpdateLanePriority ( ) ;
1189
1188
try {
1190
1189
setCurrentUpdateLanePriority ( InputDiscreteLanePriority ) ;
1191
- return runWithPriority (
1192
- UserBlockingSchedulerPriority ,
1193
- fn . bind ( null , a , b , c , d ) ,
1194
- ) ;
1190
+ return fn ( a , b , c , d ) ;
1195
1191
} finally {
1196
1192
setCurrentUpdateLanePriority ( previousLanePriority ) ;
1197
1193
executionContext = prevExecutionContext ;
@@ -1237,7 +1233,7 @@ export function flushSync<A, R>(fn: A => R, a: A): R {
1237
1233
try {
1238
1234
setCurrentUpdateLanePriority ( SyncLanePriority ) ;
1239
1235
if ( fn ) {
1240
- return runWithPriority ( ImmediateSchedulerPriority , fn . bind ( null , a ) ) ;
1236
+ return fn ( a ) ;
1241
1237
} else {
1242
1238
return ( undefined : $FlowFixMe ) ;
1243
1239
}
@@ -1257,7 +1253,7 @@ export function flushControlled(fn: () => mixed): void {
1257
1253
const previousLanePriority = getCurrentUpdateLanePriority ( ) ;
1258
1254
try {
1259
1255
setCurrentUpdateLanePriority ( SyncLanePriority ) ;
1260
- runWithPriority ( ImmediateSchedulerPriority , fn ) ;
1256
+ fn ( ) ;
1261
1257
} finally {
1262
1258
setCurrentUpdateLanePriority ( previousLanePriority ) ;
1263
1259
@@ -1753,10 +1749,7 @@ function commitRoot(root) {
1753
1749
const previousUpdateLanePriority = getCurrentUpdateLanePriority ( ) ;
1754
1750
try {
1755
1751
setCurrentUpdateLanePriority ( SyncLanePriority ) ;
1756
- runWithPriority (
1757
- ImmediateSchedulerPriority ,
1758
- commitRootImpl . bind ( null , root , previousUpdateLanePriority ) ,
1759
- ) ;
1752
+ commitRootImpl ( root , previousUpdateLanePriority ) ;
1760
1753
} finally {
1761
1754
setCurrentUpdateLanePriority ( previousUpdateLanePriority ) ;
1762
1755
}
0 commit comments