Skip to content

Commit

Permalink
[schedule] Call ensureHostCallbackIsScheduled without args (facebook#…
Browse files Browse the repository at this point in the history
…13852)

ensureHostCallbackIsScheduled reads firstCallbackNode from global scope
and need not be passed in function call
  • Loading branch information
trivikr authored and jetoneza committed Jan 23, 2019
1 parent b30e509 commit 183d127
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/scheduler/src/Scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function flushFirstCallback() {
} else if (nextAfterContinuation === firstCallbackNode) {
// The new callback is the highest priority callback in the list.
firstCallbackNode = continuationNode;
ensureHostCallbackIsScheduled(firstCallbackNode);
ensureHostCallbackIsScheduled();
}

var previous = nextAfterContinuation.previous;
Expand Down Expand Up @@ -197,7 +197,7 @@ function flushImmediateWork() {
isExecutingCallback = false;
if (firstCallbackNode !== null) {
// There's still work remaining. Request another callback.
ensureHostCallbackIsScheduled(firstCallbackNode);
ensureHostCallbackIsScheduled();
} else {
isHostCallbackScheduled = false;
}
Expand Down Expand Up @@ -242,7 +242,7 @@ function flushWork(didTimeout) {
isExecutingCallback = false;
if (firstCallbackNode !== null) {
// There's still work remaining. Request another callback.
ensureHostCallbackIsScheduled(firstCallbackNode);
ensureHostCallbackIsScheduled();
} else {
isHostCallbackScheduled = false;
}
Expand Down Expand Up @@ -340,7 +340,7 @@ function unstable_scheduleCallback(callback, deprecated_options) {
if (firstCallbackNode === null) {
// This is the first callback in the list.
firstCallbackNode = newNode.next = newNode.previous = newNode;
ensureHostCallbackIsScheduled(firstCallbackNode);
ensureHostCallbackIsScheduled();
} else {
var next = null;
var node = firstCallbackNode;
Expand All @@ -360,7 +360,7 @@ function unstable_scheduleCallback(callback, deprecated_options) {
} else if (next === firstCallbackNode) {
// The new callback has the earliest expiration in the entire list.
firstCallbackNode = newNode;
ensureHostCallbackIsScheduled(firstCallbackNode);
ensureHostCallbackIsScheduled();
}

var previous = next.previous;
Expand Down

0 comments on commit 183d127

Please sign in to comment.