dillon1000/react
Commit
Browse files [Flight] Encode enclosing line/column numbers and use it to align the fake function (#33136)
Stacked on #33135. This encodes the line/column of the enclosing function as part of the stack traces. When that information is available. I adjusted the fake function code generation so that the beginning of the arrow function aligns with these as much as possible. This ensures that when the browser tries to look up the line/column of the enclosing function, such as for getting the function name, it gets the right one. If we can't get the enclosing line/column, then we encode it at the beginning of the file. This is likely to get a miss in the source map identifiers, which means that the function name gets extracted from the runtime name instead which is better. Another thing where this is used is the in the Performance Track. Ideally that would be fixed by https://issues.chromium.org/u/1/issues/415968771 but the enclosing information is useful for other things like the function name resolution anyway. We can also use this for the "View source for this element" in React DevTools.
Changed paths4 files
First-parent comparisonpackages/react-client/src/ReactFlightClient.js ModifiedM packages/react-client/src/ReactFlightReplyClient.js ModifiedM packages/react-server/src/ReactFlightStackConfigV8.js ModifiedM packages/shared/ReactTypes.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…