8000 Bug: Redundant Operation in getEntangledLanes Function Doesn't Modify entangledLanes as Intended · Issue #31816 · facebook/react · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Bug: Redundant Operation in getEntangledLanes Function Doesn't Modify entangledLanes as Intended #31816
Closed as not planned
@Acabbage

Description

@Acabbage

Description:

In the getEntangledLanes function, there appears to be a redundant operation inside the if statement that doesn't alter the value of entangledLanes as intended. This might be a bug or oversight in the implementation.

Code Snippet:

export function getEntangledLanes(root: FiberRoot, renderLanes: Lanes): Lanes {
  let entangledLanes = renderLanes;

  if ((entangledLanes & InputContinuousLane) !== NoLanes) {
    // When updates are sync by default, we entangle continuous priority updates
    // and default updates, so they render in the same batch. The only reason
    // they use separate lanes is because continuous updates should interrupt
    // transitions, but default updates should not.
    entangledLanes |= entangledLanes & DefaultLane;
  }

  // ... rest of the function ...
}

Problem Description:

In the if statement, the intention seems to be to entangle DefaultLane with InputContinuousLane when entangledLanes includes InputContinuousLane, so they render in the same batch. However, the operation:

entangledLanes |= entangledLanes & DefaultLane;

is effectively a no-op and doesn't change entangledLanes. This means that DefaultLane is not being properly entangled as intended.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution: StaleAutomatically closed due to inactivityStatus: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0