Revert "Use highest priority lane to detect interruptions (#21088)"
This reverts commit b4044f8a07323bcad7d55cbaedc35c35b4acf7e0. Instead of LanePriority. I'm removing all uses of LanePriority so I can delete it.
Andrew Clark committed
Apr 23, 2021 at 11:55 UTC
86f3385d9ae12fe7ff233fdb5a2b46f63095a75c
2 files changed
+10
-12
packages/react-reconciler/src/ReactFiberLane.new.js
+5
-6
@@ -300,16 +300,15 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes {
300
// bother waiting until the root is complete.
301
(wipLanes & suspendedLanes) === NoLanes
302
) {
303
- const nextLane = getHighestPriorityLane(nextLanes);
304
- const wipLane = getHighestPriorityLane(wipLanes);
303
+ getHighestPriorityLanes(wipLanes);
304
+ const wipLanePriority = return_highestLanePriority;
305
if (
306
- // Tests whether the next lane is equal or lower priority than the wip
307
- // one. This works because the bits decrease in priority as you go left.
308
- nextLane >= wipLane ||
306
+ nextLanePriority <= wipLanePriority ||
307
// Default priority updates should not interrupt transition updates. The
308
// only difference between default updates and transition updates is that
309
// default updates do not support refresh transitions.
312
- (nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes)
310
+ (nextLanePriority === DefaultLanePriority &&
311
+ wipLanePriority === TransitionPriority)
312
) {
313
// Keep working on the existing in-progress tree. Do not interrupt.
314
return wipLanes;
packages/react-reconciler/src/ReactFiberLane.old.js
+5
-6
@@ -300,16 +300,15 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes {
300
// bother waiting until the root is complete.
301
(wipLanes & suspendedLanes) === NoLanes
302
) {
303
- const nextLane = getHighestPriorityLane(nextLanes);
304
- const wipLane = getHighestPriorityLane(wipLanes);
303
+ getHighestPriorityLanes(wipLanes);
304
+ const wipLanePriority = return_highestLanePriority;
305
if (
306
- // Tests whether the next lane is equal or lower priority than the wip
307
- // one. This works because the bits decrease in priority as you go left.
308
- nextLane >= wipLane ||
306
+ nextLanePriority <= wipLanePriority ||
307
// Default priority updates should not interrupt transition updates. The
308
// only difference between default updates and transition updates is that
309
// default updates do not support refresh transitions.
312
- (nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes)
310
+ (nextLanePriority === DefaultLanePriority &&
311
+ wipLanePriority === TransitionPriority)
312
) {
313
// Keep working on the existing in-progress tree. Do not interrupt.
314
return wipLanes;