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: Selective hydration causing incorrect thenable type passed to DevTools #26275

Merged
merged 1 commit into from
Mar 1, 2023

Commits on Mar 1, 2023

  1. Fix: Incorrect type of thenable passed to DevTools

    Selective hydration is implemented by suspending the current render
    using a special internal opaque object. This is conceptually similar to
    suspending with a thenable in userspace, but the opaque object should
    not leak outside of the reconciler.
    
    We were accidentally passing this object to DevTool's
    markComponentSuspended function, which expects an actual thenable. This
    happens in the error handling path (handleThrow).
    
    The fix is to check for the exception reason before calling
    markComponentSuspended. There was already a naive check in place, but
    it didn't account for all possible enum values of the exception reason.
    acdlite committed Mar 1, 2023
    Configuration menu
    Copy the full SHA
    d20f72c View commit details
    Browse the repository at this point in the history