Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporarily disable suspending during work loop #30762

Merged

Commits on Aug 23, 2024

  1. Fix: Synchronous popstate transitions

    This is a refactor of the fix in facebook#27505.
    
    When a transition update is scheduled by a popstate event, (i.e. a back/
    forward navigation) we attempt to render it synchronously even though
    it's a transition, since it's likely the previous page's data is cached.
    
    In facebook#27505, I changed the implementation so that it only "upgrades" the
    priority of the transition for a single attempt. If the attempt
    suspends, say because the data is not cached after all, from then on it
    should be treated as a normal transition.
    
    But it turns out facebook#27505 did not work as intended, because it relied on
    marking the root with pending synchronous work (root.pendingLanes),
    which was never cleared until the popstate update completed.
    
    The test scenarios I wrote accidentally worked for a different reason
    related to suspending the work loop, which I'm currently in the middle
    of refactoring.
    acdlite committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    ac17c69 View commit details
    Browse the repository at this point in the history
  2. Temporarily disable suspending during work loop

    `use` has an optimization where in some cases it can suspend the work
    loop during the render phase until the data has resolved, rather than
    unwind the stack and lose context. However, the current implementation
    is not compatible with sibling prerendering. So I've temporarily
    disabled it until the sibling prerendering has been refactored. We will
    add it back in a later step.
    acdlite committed Aug 23, 2024
    Configuration menu
    Copy the full SHA
    f72bdce View commit details
    Browse the repository at this point in the history