@samitouri / QOS-React / commits / fb30d235db

Remove didCommit from scheduler (#10182)

Don't actually need to track this, now that we removed the infinite loop check to findNextUnitOfWork

Andrew Clark committed Jul 13, 2017 at 22:11 UTC fb30d235dbcf94f3ee5acc6ed5444132cf76028d
1 file changed +2 -6
src/renderers/shared/fiber/ReactFiberScheduler.js
+2 -6
@@ -232,7 +232,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
232 let isUnmounting: boolean = false;
233
234 // Use these to prevent an infinite loop of nested updates
235 - let didCommit = false;
235 let nestedSyncUpdates = 0;
236 let NESTED_SYNC_UPDATE_LIMIT = 1000;
237
@@ -291,9 +290,8 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
290 priorityContext = nextPriorityLevel;
291
292 if (
294 - didCommit &&
295 - (nextPriorityLevel === TaskPriority ||
296 - nextPriorityLevel === SynchronousPriority)
293 + nextPriorityLevel === TaskPriority ||
294 + nextPriorityLevel === SynchronousPriority
295 ) {
296 invariant(
297 nestedSyncUpdates++ <= NESTED_SYNC_UPDATE_LIMIT,
@@ -434,7 +432,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
432 // local to this function is because errors that occur during cWU are
433 // captured elsewhere, to prevent the unmount from being interrupted.
434 isCommitting = true;
437 - didCommit = true;
435 if (__DEV__) {
436 startCommitTimer();
437 }
@@ -1011,7 +1008,6 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
1008 firstUncaughtError = null;
1009 capturedErrors = null;
1010 failedBoundaries = null;
1014 - didCommit = false;
1011 nestedSyncUpdates = 0;
1012 if (__DEV__) {
1013 stopWorkLoopTimer();