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

Fix: Synchronous popstate transitions #30759

Merged
merged 1 commit into from
Aug 23, 2024

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