dillon1000/react
Commit
Browse files [Flight] Include env in ReactAsyncInfo and ReactIOInfo (#33400)
Stacked on #33395. This lets us keep track of which environment this was fetched and awaited. Currently the IO and await is in the same environment. It's just kept when forwarded. Once we support forwarding information from a Promise fetched from another environment and awaited in this environment then the await can end up being in a different environment. There's a question of when the await is inside Flight itself such as when you return a promise fetched from another environment whether that should mean that the await is in the current environment. I don't think so since the original stack trace is the best stack trace. It's only if you `await` it in user space in this environment first that this might happen and even then it should only be considered if there wasn't a better await earlier or if reading from the other environment was itself I/O. The timing of *when* we read `environmentName()` is a little interesting here too.
Changed paths5 files
First-parent comparisonpackages/react-client/src/ReactFlightClient.js ModifiedM packages/react-client/src/ReactFlightPerformanceTrack.js ModifiedM packages/react-server/src/ReactFlightServer.js ModifiedM packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js ModifiedM packages/shared/ReactTypes.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…