Skip to content

Commit b870af2

Browse files
committed
[Scheduler] Temporarily remove wrapper function
This code is being compiled incorrectly by something in the Facebook build pipeline. I'm removing it temporarily to unblock the sync while we investigate.
1 parent 5b00757 commit b870af2

File tree

2 files changed

+4
-52
lines changed

2 files changed

+4
-52
lines changed

packages/scheduler/src/Scheduler.js

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -60,64 +60,14 @@ var isPerformingWork = false;
6060
var isHostCallbackScheduled = false;
6161
var isHostTimeoutScheduled = false;
6262

63-
function scheduler_flushTaskAtPriority_Immediate(callback, didTimeout) {
64-
return callback(didTimeout);
65-
}
66-
function scheduler_flushTaskAtPriority_UserBlocking(callback, didTimeout) {
67-
return callback(didTimeout);
68-
}
69-
function scheduler_flushTaskAtPriority_Normal(callback, didTimeout) {
70-
return callback(didTimeout);
71-
}
72-
function scheduler_flushTaskAtPriority_Low(callback, didTimeout) {
73-
return callback(didTimeout);
74-
}
75-
function scheduler_flushTaskAtPriority_Idle(callback, didTimeout) {
76-
return callback(didTimeout);
77-
}
78-
7963
function flushTask(task, callback, currentTime) {
8064
var previousPriorityLevel = currentPriorityLevel;
8165
var previousTask = currentTask;
8266
currentPriorityLevel = task.priorityLevel;
8367
currentTask = task;
8468
try {
8569
var didUserCallbackTimeout = task.expirationTime <= currentTime;
86-
// Add an extra function to the callstack. Profiling tools can use this
87-
// to infer the priority of work that appears higher in the stack.
88-
var continuationCallback;
89-
switch (currentPriorityLevel) {
90-
case ImmediatePriority:
91-
continuationCallback = scheduler_flushTaskAtPriority_Immediate(
92-
callback,
93-
didUserCallbackTimeout,
94-
);
95-
break;
96-
case UserBlockingPriority:
97-
continuationCallback = scheduler_flushTaskAtPriority_UserBlocking(
98-
callback,
99-
didUserCallbackTimeout,
100-
);
101-
break;
102-
case NormalPriority:
103-
continuationCallback = scheduler_flushTaskAtPriority_Normal(
104-
callback,
105-
didUserCallbackTimeout,
106-
);
107-
break;
108-
case LowPriority:
109-
continuationCallback = scheduler_flushTaskAtPriority_Low(
110-
callback,
111-
didUserCallbackTimeout,
112-
);
113-
break;
114-
case IdlePriority:
115-
continuationCallback = scheduler_flushTaskAtPriority_Idle(
116-
callback,
117-
didUserCallbackTimeout,
118-
);
119-
break;
120-
}
70+
var continuationCallback = callback(didUserCallbackTimeout);
12171
return typeof continuationCallback === 'function'
12272
? continuationCallback
12373
: null;

packages/scheduler/src/__tests__/Scheduler-test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,9 @@ describe('Scheduler', () => {
434434
if (__DEV__) {
435435
// Function names are minified in prod, though you could still infer the
436436
// priority if you have sourcemaps.
437-
it('adds extra function to the JS stack whose name includes the priority level', () => {
437+
// TODO: Feature temporarily disabled while we investigate a bug in one of
438+
// our minifiers.
439+
it.skip('adds extra function to the JS stack whose name includes the priority level', () => {
438440
function inferPriorityFromCallstack() {
439441
try {
440442
throw Error();

0 commit comments

Comments
 (0)