mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Remove performWithPriority from scheduler (#10638)
This commit is contained in:
@@ -25,7 +25,6 @@ import type {UpdateQueue} from 'ReactFiberUpdateQueue';
|
||||
var ReactFiberInstrumentation = require('ReactFiberInstrumentation');
|
||||
var ReactFiberReconciler = require('ReactFiberReconciler');
|
||||
var ReactInstanceMap = require('ReactInstanceMap');
|
||||
var {TaskPriority} = require('ReactPriorityLevel');
|
||||
var emptyObject = require('fbjs/lib/emptyObject');
|
||||
|
||||
var expect = require('jest-matchers');
|
||||
@@ -351,10 +350,6 @@ var ReactNoop = {
|
||||
return !!scheduledCallback;
|
||||
},
|
||||
|
||||
taskUpdates(fn: Function) {
|
||||
NoopRenderer.performWithPriority(TaskPriority, fn);
|
||||
},
|
||||
|
||||
batchedUpdates: NoopRenderer.batchedUpdates,
|
||||
|
||||
deferredUpdates: NoopRenderer.deferredUpdates,
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
import type {Fiber} from 'ReactFiber';
|
||||
import type {FiberRoot} from 'ReactFiberRoot';
|
||||
import type {PriorityLevel} from 'ReactPriorityLevel';
|
||||
import type {ReactNodeList} from 'ReactTypes';
|
||||
|
||||
var ReactFeatureFlags = require('ReactFeatureFlags');
|
||||
@@ -163,7 +162,6 @@ export type Reconciler<C, I, TI> = {
|
||||
parentComponent: ?React$Component<any, any>,
|
||||
callback: ?Function,
|
||||
): void,
|
||||
performWithPriority(priorityLevel: PriorityLevel, fn: Function): void,
|
||||
batchedUpdates<A>(fn: () => A): A,
|
||||
unbatchedUpdates<A>(fn: () => A): A,
|
||||
flushSync<A>(fn: () => A): A,
|
||||
@@ -196,7 +194,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
|
||||
var {
|
||||
scheduleUpdate,
|
||||
getPriorityContext,
|
||||
performWithPriority,
|
||||
batchedUpdates,
|
||||
unbatchedUpdates,
|
||||
flushSync,
|
||||
@@ -284,8 +281,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
|
||||
scheduleTopLevelUpdate(current, element, callback);
|
||||
},
|
||||
|
||||
performWithPriority,
|
||||
|
||||
batchedUpdates,
|
||||
|
||||
unbatchedUpdates,
|
||||
|
||||
@@ -1501,16 +1501,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
|
||||
scheduleUpdateImpl(fiber, TaskPriority, true);
|
||||
}
|
||||
|
||||
function performWithPriority(priorityLevel: PriorityLevel, fn: Function) {
|
||||
const previousPriorityContext = priorityContext;
|
||||
priorityContext = priorityLevel;
|
||||
try {
|
||||
fn();
|
||||
} finally {
|
||||
priorityContext = previousPriorityContext;
|
||||
}
|
||||
}
|
||||
|
||||
function batchedUpdates<A, R>(fn: (a: A) => R, a: A): R {
|
||||
const previousIsBatchingUpdates = isBatchingUpdates;
|
||||
isBatchingUpdates = true;
|
||||
@@ -1573,7 +1563,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
|
||||
return {
|
||||
scheduleUpdate: scheduleUpdate,
|
||||
getPriorityContext: getPriorityContext,
|
||||
performWithPriority: performWithPriority,
|
||||
batchedUpdates: batchedUpdates,
|
||||
unbatchedUpdates: unbatchedUpdates,
|
||||
flushSync: flushSync,
|
||||
|
||||
Reference in New Issue
Block a user