@samitouri / QOS-React-2 / commits / b7548b2030

Delete hasPendingUpdate

This is no longer needed. It is effectively covered by other branches that tries to being merging the update queue which yields the same state object as before if there is no work. That in turn bails out. We can shortcut in the relevant paths if needed.

Sebastian Markbage committed Dec 20, 2016 at 23:51 UTC b7548b20300226f72cead5e3997db439c23ca601
2 files changed -10
src/renderers/shared/fiber/ReactFiberBeginWork.js
-1
@@ -26,7 +26,6 @@ var {
26 cloneChildFibers,
27 } = require('ReactChildFiber');
28 var {
29 - hasPendingUpdate,
29 beginUpdateQueue,
30 } = require('ReactFiberUpdateQueue');
31 var ReactTypeOfWork = require('ReactTypeOfWork');
src/renderers/shared/fiber/ReactFiberUpdateQueue.js
-9
@@ -80,15 +80,6 @@ function comparePriority(a : PriorityLevel, b : PriorityLevel) : number {
80 return a - b;
81 }
82
83 -function hasPendingUpdate(queue : UpdateQueue, priorityLevel : PriorityLevel) : boolean {
84 - if (!queue.first) {
85 - return false;
86 - }
87 - // Return true if the first pending update has greater or equal priority.
88 - return comparePriority(queue.first.priorityLevel, priorityLevel) <= 0;
89 -}
90 -exports.hasPendingUpdate = hasPendingUpdate;
91 -
83 // Ensures that a fiber has an update queue, creating a new one if needed.
84 // Returns the new or existing queue.
85 function ensureUpdateQueue(fiber : Fiber) : UpdateQueue {