@samitouri / QOS-React / commits / 21a79a1d9f

[schedule] Call ensureHostCallbackIsScheduled without args (#13852)

ensureHostCallbackIsScheduled reads firstCallbackNode from global scope and need not be passed in function call

Trivikram Kamat committed Oct 15, 2018 at 10:26 UTC 21a79a1d9ff960742b9362be0e56d63959c40e7f
1 file changed +5 -5
packages/scheduler/src/Scheduler.js
+5 -5
@@ -165,7 +165,7 @@ function flushFirstCallback() {
165 } else if (nextAfterContinuation === firstCallbackNode) {
166 // The new callback is the highest priority callback in the list.
167 firstCallbackNode = continuationNode;
168 - ensureHostCallbackIsScheduled(firstCallbackNode);
168 + ensureHostCallbackIsScheduled();
169 }
170
171 var previous = nextAfterContinuation.previous;
@@ -197,7 +197,7 @@ function flushImmediateWork() {
197 isExecutingCallback = false;
198 if (firstCallbackNode !== null) {
199 // There's still work remaining. Request another callback.
200 - ensureHostCallbackIsScheduled(firstCallbackNode);
200 + ensureHostCallbackIsScheduled();
201 } else {
202 isHostCallbackScheduled = false;
203 }
@@ -242,7 +242,7 @@ function flushWork(didTimeout) {
242 isExecutingCallback = false;
243 if (firstCallbackNode !== null) {
244 // There's still work remaining. Request another callback.
245 - ensureHostCallbackIsScheduled(firstCallbackNode);
245 + ensureHostCallbackIsScheduled();
246 } else {
247 isHostCallbackScheduled = false;
248 }
@@ -340,7 +340,7 @@ function unstable_scheduleCallback(callback, deprecated_options) {
340 if (firstCallbackNode === null) {
341 // This is the first callback in the list.
342 firstCallbackNode = newNode.next = newNode.previous = newNode;
343 - ensureHostCallbackIsScheduled(firstCallbackNode);
343 + ensureHostCallbackIsScheduled();
344 } else {
345 var next = null;
346 var node = firstCallbackNode;
@@ -360,7 +360,7 @@ function unstable_scheduleCallback(callback, deprecated_options) {
360 } else if (next === firstCallbackNode) {
361 // The new callback has the earliest expiration in the entire list.
362 firstCallbackNode = newNode;
363 - ensureHostCallbackIsScheduled(firstCallbackNode);
363 + ensureHostCallbackIsScheduled();
364 }
365
366 var previous = next.previous;