Skip to content

Commit 1df6d56

Browse files
committed
Track debugInfo on module state instead of stack
Notably with DON'T use try/finally because if something throws we want to observe what it was at the time we threw. Now we can use this when we create the Throw Fiber to associate the Server Components that were part of the parent stack before this error threw.
1 parent 52ca1a9 commit 1df6d56

File tree

2 files changed

+126
-124
lines changed

2 files changed

+126
-124
lines changed

packages/react-client/src/__tests__/ReactFlight-test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,8 +1050,10 @@ describe('ReactFlight', () => {
10501050
}
10511051

10521052
const expectedStack = __DEV__
1053-
? // TODO: This should include Throw but it doesn't have a Fiber.
1054-
'\n in div' + '\n in ErrorBoundary (at **)' + '\n in App'
1053+
? '\n in Throw' +
1054+
'\n in div' +
1055+
'\n in ErrorBoundary (at **)' +
1056+
'\n in App'
10551057
: '\n in div' + '\n in ErrorBoundary (at **)';
10561058

10571059
function App() {

0 commit comments

Comments
 (0)