GeezerVison is showing github.com — Revert "Use highest priority lane to detect interruptions (#21088)" · react/react@86f3385
File tree
Expand file treeCollapse file tree
Open diff view settings
packages/react-reconciler/src
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberLane.new.js +5-6Lines changed: 5 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -300,16 +300,15 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes { |
300 | 300 | // bother waiting until the root is complete. |
301 | 301 | (wipLanes & suspendedLanes) === NoLanes |
302 | 302 | ) { |
303 | | - const nextLane = getHighestPriorityLane(nextLanes); |
304 | | - const wipLane = getHighestPriorityLane(wipLanes); |
| 303 | + getHighestPriorityLanes(wipLanes); |
| 304 | + const wipLanePriority = return_highestLanePriority; |
305 | 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 || |
309 | 307 | // Default priority updates should not interrupt transition updates. The |
310 | 308 | // only difference between default updates and transition updates is that |
311 | 309 | // default updates do not support refresh transitions. |
312 | | - (nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes) |
| 310 | + (nextLanePriority === DefaultLanePriority && |
| 311 | + wipLanePriority === TransitionPriority) |
313 | 312 | ) { |
314 | 313 | // Keep working on the existing in-progress tree. Do not interrupt. |
315 | 314 | return wipLanes; |
|
Collapse file
Copy file name to clipboardExpand all lines: packages/react-reconciler/src/ReactFiberLane.old.js +5-6Lines changed: 5 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -300,16 +300,15 @@ export function getNextLanes(root: FiberRoot, wipLanes: Lanes): Lanes { |
300 | 300 | // bother waiting until the root is complete. |
301 | 301 | (wipLanes & suspendedLanes) === NoLanes |
302 | 302 | ) { |
303 | | - const nextLane = getHighestPriorityLane(nextLanes); |
304 | | - const wipLane = getHighestPriorityLane(wipLanes); |
| 303 | + getHighestPriorityLanes(wipLanes); |
| 304 | + const wipLanePriority = return_highestLanePriority; |
305 | 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 || |
309 | 307 | // Default priority updates should not interrupt transition updates. The |
310 | 308 | // only difference between default updates and transition updates is that |
311 | 309 | // default updates do not support refresh transitions. |
312 | | - (nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes) |
| 310 | + (nextLanePriority === DefaultLanePriority && |
| 311 | + wipLanePriority === TransitionPriority) |
313 | 312 | ) { |
314 | 313 | // Keep working on the existing in-progress tree. Do not interrupt. |
315 | 314 | return wipLanes; |
|