You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit da84bd9
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(solid): hydration trace's fake Promise provides withResolvers and try (#3727)
During hydration adoption, subFetch runs the compute once under a
never-settling fake `Promise` to record its dependencies. The fake had
no `withResolvers` or `try`, so a traced compute calling either threw
out of hydration instead of adopting the server value.
- `withResolvers` returns a never-settling fake with no-op
`resolve`/`reject`.
- `try` returns a never-settling fake without invoking its callback,
matching the fake constructor, which ignores its executor.
Every other standard static and prototype method was already present.
Size-Exception accepted by the maintainer: the two frozen page caps
rise to fit (+67 B minified; brotli +99 B / +96 B):
- page: base server components: 45.95 -> 46.04 KB
- page: live server components: 50.12 -> 50.17 KB
Co-authored-by: Claude via Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
Fix hydration adoption throwing when a traced compute calls `Promise.withResolvers()` or `Promise.try()`. The trace run swaps the global `Promise` for a never-settling mock that lacked these two statics, so the call threw out of hydration instead of adopting the server value. The mock now provides both: `withResolvers` returns a never-settling mock with no-op `resolve`/`reject`, and `try` returns a never-settling mock without invoking its callback (matching how the mock's constructor ignores its executor).
0 commit comments