Skip to content

Bug: Potential misuse of NoLanes in executionContext check in scheduleUpdateOnFiber #33169

@0xFANGO

Description

@0xFANGO

React version:

19.2.0

Steps To Reproduce

  1. Go to [scheduleUpdateOnFiber](https://github.com/facebook/react/blob/main/packages/react-reconciler/src/ReactFiberWorkLoop.js) function in react-reconciler

  2. Find this line:

    if ((executionContext & RenderContext) !== NoLanes && root === workInProgressRoot)
  3. Notice that executionContext is a set of context flags (bitmask), while NoLanes refers to lane priorities and is not used in context checks anywhere else


Link to code example

No runtime code needed — this is a logic-level mismatch in the internal source file.

Relevant file:

  • packages/react-reconciler/src/ReactFiberWorkLoop.js

❌ The current behavior

The line:

(executionContext & RenderContext) !== NoLanes

uses NoLanes in a bitmask comparison with executionContext, which is inconsistent with surrounding usages that compare with NoContext.

NoLanes is defined in the Lane system and is intended for scheduling lanes, not execution contexts.


✅ The expected behavior

This line should likely be:

(executionContext & RenderContext) !== NoContext

This matches similar checks throughout the codebase and would avoid incorrect context evaluation.


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