Skip to content

Commit 7d77d79

Browse files
authored
Remove performWithPriority from scheduler (facebook#10638)
1 parent 8b7082e commit 7d77d79

File tree

3 files changed

+0
-21
lines changed

3 files changed

+0
-21
lines changed

src/renderers/noop/ReactNoopEntry.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import type {UpdateQueue} from 'ReactFiberUpdateQueue';
2525
var ReactFiberInstrumentation = require('ReactFiberInstrumentation');
2626
var ReactFiberReconciler = require('ReactFiberReconciler');
2727
var ReactInstanceMap = require('ReactInstanceMap');
28-
var {TaskPriority} = require('ReactPriorityLevel');
2928
var emptyObject = require('fbjs/lib/emptyObject');
3029

3130
var expect = require('jest-matchers');
@@ -351,10 +350,6 @@ var ReactNoop = {
351350
return !!scheduledCallback;
352351
},
353352

354-
taskUpdates(fn: Function) {
355-
NoopRenderer.performWithPriority(TaskPriority, fn);
356-
},
357-
358353
batchedUpdates: NoopRenderer.batchedUpdates,
359354

360355
deferredUpdates: NoopRenderer.deferredUpdates,

src/renderers/shared/fiber/ReactFiberReconciler.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import type {Fiber} from 'ReactFiber';
1616
import type {FiberRoot} from 'ReactFiberRoot';
17-
import type {PriorityLevel} from 'ReactPriorityLevel';
1817
import type {ReactNodeList} from 'ReactTypes';
1918

2019
var ReactFeatureFlags = require('ReactFeatureFlags');
@@ -163,7 +162,6 @@ export type Reconciler<C, I, TI> = {
163162
parentComponent: ?React$Component<any, any>,
164163
callback: ?Function,
165164
): void,
166-
performWithPriority(priorityLevel: PriorityLevel, fn: Function): void,
167165
batchedUpdates<A>(fn: () => A): A,
168166
unbatchedUpdates<A>(fn: () => A): A,
169167
flushSync<A>(fn: () => A): A,
@@ -196,7 +194,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
196194
var {
197195
scheduleUpdate,
198196
getPriorityContext,
199-
performWithPriority,
200197
batchedUpdates,
201198
unbatchedUpdates,
202199
flushSync,
@@ -284,8 +281,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
284281
scheduleTopLevelUpdate(current, element, callback);
285282
},
286283

287-
performWithPriority,
288-
289284
batchedUpdates,
290285

291286
unbatchedUpdates,

src/renderers/shared/fiber/ReactFiberScheduler.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,16 +1501,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
15011501
scheduleUpdateImpl(fiber, TaskPriority, true);
15021502
}
15031503

1504-
function performWithPriority(priorityLevel: PriorityLevel, fn: Function) {
1505-
const previousPriorityContext = priorityContext;
1506-
priorityContext = priorityLevel;
1507-
try {
1508-
fn();
1509-
} finally {
1510-
priorityContext = previousPriorityContext;
1511-
}
1512-
}
1513-
15141504
function batchedUpdates<A, R>(fn: (a: A) => R, a: A): R {
15151505
const previousIsBatchingUpdates = isBatchingUpdates;
15161506
isBatchingUpdates = true;
@@ -1573,7 +1563,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
15731563
return {
15741564
scheduleUpdate: scheduleUpdate,
15751565
getPriorityContext: getPriorityContext,
1576-
performWithPriority: performWithPriority,
15771566
batchedUpdates: batchedUpdates,
15781567
unbatchedUpdates: unbatchedUpdates,
15791568
flushSync: flushSync,

0 commit comments

Comments
 (0)