-
Notifications
You must be signed in to change notification settings - Fork 50.4k
[Fizz] Push a stalled use() to the ownerStack/debugTask #35226
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
Conversation
b2a0edf to
7c6ae2e
Compare
c364caf to
b617d13
Compare
22689b0 to
3c7b53f
Compare
…chance to process the ping
would be too disruptive
3c7b53f to
cbfb89e
Compare
| if ( | ||
| request.status === ABORTING && | ||
| // If we already started rendering the Lazy Componentn in an aborting state | ||
| // and reach this point, the lazy was already resolved. | ||
| // We don't bail here again since this is most likely a discarded rerender | ||
| // to get the stack where we suspended in dev. | ||
| (!__DEV__ || !previouslyAbortingDEV) | ||
| ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should be more explicit about when we are in a stalled retry render rather than inferring too much. I wonder if multiple aborts could lead to this getting through here in dev when it wouldn't otherwise. You could make a new dev only status for the task that is checked instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6c79426 to
27f2043
Compare
Same as #33634 but for
useand promise-as-a-child.An alternative to re-rendering would've been to eagerly collect
use()calls but we knowError()is slow in v8.The danger with lazily collecting
use()is that the Thenable may be resolved when we abort.In those cases we remove instrumentation on the last thenable to ensure we suspend again. To ensure Thenable subclasses can't observe the corrupted state, we noop
.then.The shown stack relies on sourcemaps with
ignoreList. Otherwise it'll point into React internals. From the dispatcher we wouldn't know how many stacks we have to cut without a circular dependency to theReact.usefunction.