Skip to content

Commit

Permalink
Revert "Use highest priority lane to detect interruptions (#21088)"
Browse files Browse the repository at this point in the history
This reverts commit b4044f8.

Instead of LanePriority.

I'm removing all uses of LanePriority so I can delete it.
  • Loading branch information
acdlite committed Apr 28, 2021
1 parent c670265 commit 86f3385
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
11 changes: 5 additions & 6 deletions packages/react-reconciler/src/ReactFiberLane.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,15 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes {
// bother waiting until the root is complete.
(wipLanes & suspendedLanes) === NoLanes
) {
const nextLane = getHighestPriorityLane(nextLanes);
const wipLane = getHighestPriorityLane(wipLanes);
getHighestPriorityLanes(wipLanes);
const wipLanePriority = return_highestLanePriority;
if (
// Tests whether the next lane is equal or lower priority than the wip
// one. This works because the bits decrease in priority as you go left.
nextLane >= wipLane ||
nextLanePriority <= wipLanePriority ||
// Default priority updates should not interrupt transition updates. The
// only difference between default updates and transition updates is that
// default updates do not support refresh transitions.
(nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes)
(nextLanePriority === DefaultLanePriority &&
wipLanePriority === TransitionPriority)
) {
// Keep working on the existing in-progress tree. Do not interrupt.
return wipLanes;
Expand Down
11 changes: 5 additions & 6 deletions packages/react-reconciler/src/ReactFiberLane.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,15 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes {
// bother waiting until the root is complete.
(wipLanes & suspendedLanes) === NoLanes
) {
const nextLane = getHighestPriorityLane(nextLanes);
const wipLane = getHighestPriorityLane(wipLanes);
getHighestPriorityLanes(wipLanes);
const wipLanePriority = return_highestLanePriority;
if (
// Tests whether the next lane is equal or lower priority than the wip
// one. This works because the bits decrease in priority as you go left.
nextLane >= wipLane ||
nextLanePriority <= wipLanePriority ||
// Default priority updates should not interrupt transition updates. The
// only difference between default updates and transition updates is that
// default updates do not support refresh transitions.
(nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes)
(nextLanePriority === DefaultLanePriority &&
wipLanePriority === TransitionPriority)
) {
// Keep working on the existing in-progress tree. Do not interrupt.
return wipLanes;
Expand Down

0 comments on commit 86f3385

Please sign in to comment.