diff --git a/fixtures/scheduler/index.html b/fixtures/scheduler/index.html
index 5da9d66163010..4bc57fbd9a7cf 100644
--- a/fixtures/scheduler/index.html
+++ b/fixtures/scheduler/index.html
@@ -91,19 +91,8 @@
Tests:
If the counter advanced while you were away from this tab, it's correct.
- Can pause execution, dump scheduled callbacks, and continue where it left off
-
- Click the button above, press "continue" to finish the test after it pauses:
-
- Expected:
-
-
- -------------------------------------------------
- If the test didn't progress until you hit "continue" and
- you see the same above and below afterwards it's correct.
-
-------------------------------------------------
-
Actual:
-
+
Test Eight Removed
+
Test 8 was removed because it was testing a feature that was removed from the scheduler.
Can force a specific framerate
@@ -156,9 +145,6 @@ Tests:
unstable_scheduleCallback: scheduleCallback,
unstable_cancelCallback: cancelCallback,
unstable_now: now,
- unstable_getFirstCallbackNode: getFirstCallbackNode,
- unstable_pauseExecution: pauseExecution,
- unstable_continueExecution: continueExecution,
unstable_forceFrameRate: forceFrameRate,
unstable_shouldYield: shouldYield,
unstable_NormalPriority: NormalPriority,
@@ -587,50 +573,6 @@ Tests:
scheduleCallback(NormalPriority, incrementCounterAndScheduleNextCallback);
}
-function runTestEight() {
- // Test 8
- // Pauses execution, dumps the queue, and continues execution
- clearTestResult(8);
-
- function countNodesInStack(firstCallbackNode) {
- var node = firstCallbackNode;
- var count = 0;
- if (node !== null) {
- do {
- count = count + 1;
- node = node.next;
- } while (node !== firstCallbackNode);
- }
- return count;
- }
-
- scheduleCallback(NormalPriority, () => {
-
- // size should be 0
- updateTestResult(8, `Queue size: ${countNodesInStack(getFirstCallbackNode())}.`);
- updateTestResult(8, 'Pausing... press continue to resume.');
- pauseExecution();
-
- scheduleCallback(NormalPriority, function () {
- updateTestResult(8, 'Finishing...');
- displayTestResult(8);
- })
- scheduleCallback(NormalPriority, function () {
- updateTestResult(8, 'Done!');
- displayTestResult(8);
- checkTestResult(8);
- })
-
- // new size should be 2 now
- updateTestResult(8, `Queue size: ${countNodesInStack(getFirstCallbackNode())}.`);
- displayTestResult(8);
- });
-}
-
-function continueTestEight() {
- continueExecution();
-}
-
function runTestNine() {
clearTestResult(9);
// We have this to make sure that the thing that goes right after it can get a full frame
diff --git a/packages/scheduler/src/SchedulerFeatureFlags.js b/packages/scheduler/src/SchedulerFeatureFlags.js
index a5166f9813193..6828d0105ebb5 100644
--- a/packages/scheduler/src/SchedulerFeatureFlags.js
+++ b/packages/scheduler/src/SchedulerFeatureFlags.js
@@ -7,7 +7,6 @@
* @flow strict
*/
-export const enableSchedulerDebugging = false;
export const enableProfiling = false;
export const frameYieldMs = 5;
diff --git a/packages/scheduler/src/forks/Scheduler.js b/packages/scheduler/src/forks/Scheduler.js
index 3fe4d1720fc38..8b34f26bd0551 100644
--- a/packages/scheduler/src/forks/Scheduler.js
+++ b/packages/scheduler/src/forks/Scheduler.js
@@ -12,7 +12,6 @@
import type {PriorityLevel} from '../SchedulerPriorities';
import {
- enableSchedulerDebugging,
enableProfiling,
frameYieldMs,
userBlockingPriorityTimeout,
@@ -83,9 +82,6 @@ var timerQueue: Array = [];
// Incrementing id counter. Used to maintain insertion order.
var taskIdCounter = 1;
-// Pausing the scheduler is useful for debugging.
-var isSchedulerPaused = false;
-
var currentTask = null;
var currentPriorityLevel = NormalPriority;
@@ -193,10 +189,7 @@ function workLoop(initialTime: number) {
let currentTime = initialTime;
advanceTimers(currentTime);
currentTask = peek(taskQueue);
- while (
- currentTask !== null &&
- !(enableSchedulerDebugging && isSchedulerPaused)
- ) {
+ while (currentTask !== null) {
if (!enableAlwaysYieldScheduler) {
if (currentTask.expirationTime > currentTime && shouldYieldToHost()) {
// This currentTask hasn't expired, and we've reached the deadline.
@@ -422,22 +415,6 @@ function unstable_scheduleCallback(
return newTask;
}
-function unstable_pauseExecution() {
- isSchedulerPaused = true;
-}
-
-function unstable_continueExecution() {
- isSchedulerPaused = false;
- if (!isHostCallbackScheduled && !isPerformingWork) {
- isHostCallbackScheduled = true;
- requestHostCallback();
- }
-}
-
-function unstable_getFirstCallbackNode(): Task | null {
- return peek(taskQueue);
-}
-
function unstable_cancelCallback(task: Task) {
if (enableProfiling) {
if (task.isQueued) {
@@ -606,9 +583,6 @@ export {
unstable_getCurrentPriorityLevel,
shouldYieldToHost as unstable_shouldYield,
requestPaint as unstable_requestPaint,
- unstable_continueExecution,
- unstable_pauseExecution,
- unstable_getFirstCallbackNode,
getCurrentTime as unstable_now,
forceFrameRate as unstable_forceFrameRate,
};
diff --git a/packages/scheduler/src/forks/SchedulerFeatureFlags.www.js b/packages/scheduler/src/forks/SchedulerFeatureFlags.www.js
index 1d6b955eb8888..2873dee099787 100644
--- a/packages/scheduler/src/forks/SchedulerFeatureFlags.www.js
+++ b/packages/scheduler/src/forks/SchedulerFeatureFlags.www.js
@@ -12,7 +12,6 @@ const dynamicFeatureFlags = require('SchedulerFeatureFlags');
export const {enableRequestPaint} = dynamicFeatureFlags;
-export const enableSchedulerDebugging = false;
export const enableProfiling = __DEV__;
export const frameYieldMs = 10;
diff --git a/packages/scheduler/src/forks/SchedulerMock.js b/packages/scheduler/src/forks/SchedulerMock.js
index 7f148c45be3e4..b638bf1eaf519 100644
--- a/packages/scheduler/src/forks/SchedulerMock.js
+++ b/packages/scheduler/src/forks/SchedulerMock.js
@@ -12,10 +12,7 @@
import type {PriorityLevel} from '../SchedulerPriorities';
-import {
- enableSchedulerDebugging,
- enableProfiling,
-} from '../SchedulerFeatureFlags';
+import {enableProfiling} from '../SchedulerFeatureFlags';
import {push, pop, peek} from '../SchedulerMinHeap';
// TODO: Use symbols?
@@ -72,9 +69,6 @@ var timerQueue: Array = [];
// Incrementing id counter. Used to maintain insertion order.
var taskIdCounter = 1;
-// Pausing the scheduler is useful for debugging.
-var isSchedulerPaused = false;
-
var currentTask = null;
var currentPriorityLevel = NormalPriority;
@@ -195,10 +189,7 @@ function workLoop(hasTimeRemaining: boolean, initialTime: number): boolean {
let currentTime = initialTime;
advanceTimers(currentTime);
currentTask = peek(taskQueue);
- while (
- currentTask !== null &&
- !(enableSchedulerDebugging && isSchedulerPaused)
- ) {
+ while (currentTask !== null) {
if (
currentTask.expirationTime > currentTime &&
(!hasTimeRemaining || shouldYieldToHost())
@@ -422,22 +413,6 @@ function unstable_scheduleCallback(
return newTask;
}
-function unstable_pauseExecution() {
- isSchedulerPaused = true;
-}
-
-function unstable_continueExecution() {
- isSchedulerPaused = false;
- if (!isHostCallbackScheduled && !isPerformingWork) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- }
-}
-
-function unstable_getFirstCallbackNode(): Task | null {
- return peek(taskQueue);
-}
-
function unstable_cancelCallback(task: Task) {
if (enableProfiling) {
if (task.isQueued) {
@@ -679,9 +654,6 @@ export {
unstable_getCurrentPriorityLevel,
shouldYieldToHost as unstable_shouldYield,
requestPaint as unstable_requestPaint,
- unstable_continueExecution,
- unstable_pauseExecution,
- unstable_getFirstCallbackNode,
getCurrentTime as unstable_now,
forceFrameRate as unstable_forceFrameRate,
unstable_flushAllWithoutAsserting,
diff --git a/packages/scheduler/src/forks/SchedulerNative.js b/packages/scheduler/src/forks/SchedulerNative.js
index 3832cbc69753e..33f9ae3313534 100644
--- a/packages/scheduler/src/forks/SchedulerNative.js
+++ b/packages/scheduler/src/forks/SchedulerNative.js
@@ -97,9 +97,6 @@ export const unstable_now: () => number | DOMHighResTimeStamp =
export const unstable_next: any = throwNotImplemented;
export const unstable_runWithPriority: any = throwNotImplemented;
export const unstable_wrapCallback: any = throwNotImplemented;
-export const unstable_continueExecution: any = throwNotImplemented;
-export const unstable_pauseExecution: any = throwNotImplemented;
-export const unstable_getFirstCallbackNode: any = throwNotImplemented;
export const unstable_forceFrameRate: any = throwNotImplemented;
export const unstable_Profiling: any = null;
diff --git a/packages/scheduler/src/forks/SchedulerPostTask.js b/packages/scheduler/src/forks/SchedulerPostTask.js
index a029fce0cbfcc..7465c38b92f8a 100644
--- a/packages/scheduler/src/forks/SchedulerPostTask.js
+++ b/packages/scheduler/src/forks/SchedulerPostTask.js
@@ -234,13 +234,5 @@ export function unstable_wrapCallback(callback: () => T): () => T {
export function unstable_forceFrameRate() {}
-export function unstable_pauseExecution() {}
-
-export function unstable_continueExecution() {}
-
-export function unstable_getFirstCallbackNode(): null {
- return null;
-}
-
// Currently no profiling build
export const unstable_Profiling = null;
diff --git a/scripts/jest/setupTests.www.js b/scripts/jest/setupTests.www.js
index efee213861ca6..b0b653bb78ff9 100644
--- a/scripts/jest/setupTests.www.js
+++ b/scripts/jest/setupTests.www.js
@@ -34,9 +34,9 @@ jest.mock('scheduler/src/SchedulerFeatureFlags', () => {
schedulerSrcPath + '/src/forks/SchedulerFeatureFlags.www'
);
- // These flags are not a dynamic on www, but we still want to run
- // tests in both versions.
- actual.enableSchedulerDebugging = __VARIANT__;
+ // Add flags here that are not a dynamic on www,
+ // but we still want to run tests in both versions.
+ //
return actual;
});