Fixed potential interaction tracing leak in Suspense memoization #15531
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.
I also audited the other places we call
unstable_wrap()
in the React DOM bundle and verified that they didn't have a similar problem. We have pretty good suspense test coverage and pretty good tracing test coverage, but it seems like our test coverage of the overlap may be a little weak. (Although to be fair, one of the profiler tests would have caught this if I hadn't mistakenly overlooked it.)This code has been around for a long time (PR #14429) but only started causing a noticeable problem after a recent React sync.