Remove performWithPriority from scheduler (#10638)

This commit is contained in:
Clement Hoang
2017-09-07 17:35:06 -07:00
committed by GitHub
parent 8b7082eced
commit 7d77d795c2
3 changed files with 0 additions and 21 deletions

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,