Fix a crash in Suspense with findDOMNode#15195
Closed
gaearon wants to merge 1 commit intofacebook:masterfrom
Closed
Fix a crash in Suspense with findDOMNode#15195gaearon wants to merge 1 commit intofacebook:masterfrom
gaearon wants to merge 1 commit intofacebook:masterfrom
Conversation
gaearon
commented
Mar 22, 2019
| parentA = maybeSuspense; | ||
| parentB = maybeSuspense; | ||
| a = maybeSuspenseFragment; | ||
| b = maybeSuspenseFragment; |
Collaborator
Author
There was a problem hiding this comment.
I don't know if it's legit to have them pointing to the same one. I haven't really thought whether this makes sense.
|
ReactDOM: size: 🔺+0.1%, gzip: 🔺+0.1% Details of bundled changes.Comparing: 8e9a013...43e7858 react-dom
react-art
react-native-renderer
react-test-renderer
react-reconciler
Generated by 🚫 dangerJS |
sebmarkbage
reviewed
Mar 22, 2019
| maybeSuspense.memoizedState !== null | ||
| ) { | ||
| parentA = maybeSuspense; | ||
| parentB = maybeSuspense; |
Contributor
There was a problem hiding this comment.
I believe it’s possible for the suspense to have an alternate and we might be coming from the disconnected tree.
Collaborator
Author
|
Fixed in #15312 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Another attempt at #14198.
Fixes the internal crash we've recently observed.
I know this fix might have weird semantics (which DOM node should it return for a suspended tree?) but it still seems better to not crash in this case IMO.