Repository: facebook/react
Pull request: [Flight] Skip the stack frame of built-in wrappers that create or await Promises

We already do this with `"new Promise"` and `"Promise.then"`. There are also many helpers that both create promises and awaits other promises inside of it like `Promise.all`.

The way this is filtered is different from just filtering out all anonymous stacks since they're used to determine where the boundary is between ignore listed and user space.

Ideally we'd cover more wrappers that are internal to Promise libraries.


Changed files:
filename: packages/react-server/src/ReactFlightServer.js
patch: @@ -194,6 +194,49 @@ function devirtualizeURL(url: string): string {
   return url;
 }
 
+function isPromiseCreationInternal(url: string, functionName: string): boolean {
+  // Various internals of the JS VM can create Promises but the call frame of the
+  // internals are not very interesting for our purposes so we need to skip those.
+  if (url === 'node:internal/async_hooks') {
+    // Ignore the stack frames from the async hooks themselves.
+    return true;
+  }
+  if (url !== '') {
+    return false;
+  }
+  switch (functionName) {
+    case 'new Promise':
+    case 'Function.withResolvers':
+    case 'Function.reject':
+    case 'Function.resolve':
+    case 'Function.all':
+    case 'Function.allSettled':
+    case 'Function.race':
+    case 'Function.try':
+      return true;
+    default:
+      return false;
+  }
+}
+
+function stripLeadingPromiseCreationFrames(
+  stack: ReactStackTrace,
+): ReactStackTrace {
+  for (let i = 0; i < stack.length; i++) {
+    const callsite = stack[i];
+    const functionName = callsite[0];
+    const url = callsite[1];
+    if (!isPromiseCreationInternal(url, functionName)) {
+      if (i > 0) {
+        return stack.slice(i);
+      } else {
+        return stack;
+      }
+    }
+  }
+  return [];
+}
+
 function findCalledFunctionNameFromStackTrace(
   request: Request,
   stack: ReactStackTrace,
@@ -207,11 +250,7 @@ function findCalledFunctionNameFromStackTrace(
     const url = devirtualizeURL(callsite[1]);
     const lineNumber = callsite[2];
     const columnNumber = callsite[3];
-    if (functionName === 'new Promise') {
-      // Ignore Promise constructors.
-    } else if (url === 'node:internal/async_hooks') {
-      // Ignore the stack frames from the async hooks themselves.
-    } else if (filterStackFrame(url, functionName, lineNumber, columnNumber)) {
+    if (filterStackFrame(url, functionName, lineNumber, columnNumber)) {
       if (bestMatch === '') {
         // If we had no good stack frames for internal calls, just use the last
         // first party function name.
@@ -275,13 +314,44 @@ function hasUnfilteredFrame(request: Request, stack: ReactStackTrace): boolean {
   return false;
 }
 
+function isPromiseAwaitInternal(url: string, functionName: string): boolean {
+  // Various internals of the JS VM can await internally on a Promise. If those are at
+  // the top of the stack then we don't want to consider them as internal frames. The
+  // true "await" conceptually is the thing that called the helper.
+  // Ideally we'd also include common third party helpers for this.
+  if (url === 'node:internal/async_hooks') {
+    // Ignore the stack frames from the async hooks themselves.
+    return true;
+  }
+  if (url !== '') {
+    return false;
+  }
+  switch (functionName) {
+    case 'Promise.then':
+    case 'Promise.catch':
+    case 'Promise.finally':
+    case 'Function.reject':
+    case 'Function.resolve':
+    case 'Function.all':
+    case 'Function.allSettled':
+    case 'Function.race':
+    case 'Function.try':
+      return true;
+    default:
+      return false;
+  }
+}
+
 export function isAwaitInUserspace(
   request: Request,
   stack: ReactStackTrace,
 ): boolean {
   let firstFrame = 0;
-  while (stack.length > firstFrame && stack[firstFrame][0] === 'Promise.then') {
-    // Skip Promise.then frame itself.
+  while (
+    stack.length > firstFrame &&
+    isPromiseAwaitInternal(stack[firstFrame][1], stack[firstFrame][0])
+  ) {
+    // Skip the internal frame that awaits itself.
     firstFrame++;
   }
   if (stack.length > firstFrame) {
@@ -4213,7 +4283,8 @@ function serializeIONode(
   let stack = null;
   let name = '';
   if (ioNode.stack !== null) {
-    const fullStack = ioNode.stack;
+    // The stack can contain some leading internal frames for the construction of the promise that we skip.
+    const fullStack = stripLeadingPromiseCreationFrames(ioNode.stack);
     stack = filterStackTrace(request, fullStack);
     name = findCalledFunctionNameFromStackTrace(request, fullStack);
     // The name can include the object that this was called on but sometimes that's

filename: packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js
patch: @@ -107,7 +107,6 @@ function getDebugInfo(obj) {
 
 function filterStackFrame(filename, functionName) {
   return (
-    filename !== '' &&
     !filename.startsWith('node:') &&
     !filename.includes('node_modules') &&
     // Filter out our own internal source code since it'll typically be in node_modules
@@ -234,9 +233,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Object.<anonymous>",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                203,
+                202,
                 109,
-                183,
+                182,
                 50,
               ],
             ],
@@ -258,9 +257,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    203,
+                    202,
                     109,
-                    183,
+                    182,
                     50,
                   ],
                 ],
@@ -269,25 +268,25 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "getData",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  185,
-                  13,
                   184,
+                  13,
+                  183,
                   5,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  192,
-                  26,
                   191,
+                  26,
+                  190,
                   5,
                 ],
               ],
@@ -306,9 +305,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Object.<anonymous>",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  203,
+                  202,
                   109,
-                  183,
+                  182,
                   50,
                 ],
               ],
@@ -317,17 +316,17 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "getData",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                185,
-                13,
                 184,
+                13,
+                183,
                 5,
               ],
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                192,
-                26,
                 191,
+                26,
+                190,
                 5,
               ],
             ],
@@ -352,9 +351,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    203,
+                    202,
                     109,
-                    183,
+                    182,
                     50,
                   ],
                 ],
@@ -363,33 +362,31 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "getData",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  186,
+                  185,
                   21,
-                  184,
+                  183,
                   5,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  192,
-                  20,
                   191,
+                  20,
+                  190,
                   5,
                 ],
               ],
               "start": 0,
               "value": {
-                "value": [
-                  ,
-                ],
+                "value": undefined,
               },
             },
             "env": "Server",
@@ -402,9 +399,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Object.<anonymous>",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  203,
+                  202,
                   109,
-                  183,
+                  182,
                   50,
                 ],
               ],
@@ -413,17 +410,17 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "getData",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                187,
+                186,
                 21,
-                184,
+                183,
                 5,
               ],
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                192,
-                20,
                 191,
+                20,
+                190,
                 5,
               ],
             ],
@@ -443,9 +440,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                194,
+                193,
                 60,
-                191,
+                190,
                 5,
               ],
             ],
@@ -467,9 +464,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    203,
+                    202,
                     109,
-                    183,
+                    182,
                     50,
                   ],
                 ],
@@ -478,17 +475,17 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "getData",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  186,
+                  185,
                   21,
-                  184,
+                  183,
                   5,
                 ],
               ],
@@ -507,9 +504,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  194,
+                  193,
                   60,
-                  191,
+                  190,
                   5,
                 ],
               ],
@@ -518,9 +515,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "InnerComponent",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                200,
+                199,
                 35,
-                197,
+                196,
                 5,
               ],
             ],
@@ -594,11 +591,19 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Object.<anonymous>",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                558,
+                555,
                 40,
-                539,
+                536,
                 49,
               ],
+              [
+                "new Promise",
+                "",
+                0,
+                0,
+                0,
+                0,
+              ],
             ],
           },
           {
@@ -618,36 +623,44 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    558,
+                    555,
                     40,
-                    539,
+                    536,
                     49,
                   ],
+                  [
+                    "new Promise",
+                    "",
+                    0,
+                    0,
+                    0,
+                    0,
+                  ],
                 ],
               },
               "stack": [
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "getData",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  541,
+                  538,
                   13,
-                  540,
+                  537,
                   5,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  546,
+                  543,
                   36,
-                  545,
+                  542,
                   5,
                 ],
               ],
@@ -666,28 +679,36 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Object.<anonymous>",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  558,
+                  555,
                   40,
-                  539,
+                  536,
                   49,
                 ],
+                [
+                  "new Promise",
+                  "",
+                  0,
+                  0,
+                  0,
+                  0,
+                ],
               ],
             },
             "stack": [
               [
                 "getData",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                541,
+                538,
                 13,
-                540,
+                537,
                 5,
               ],
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                546,
+                543,
                 36,
-                545,
+                542,
                 5,
               ],
             ],
@@ -707,9 +728,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                548,
-                60,
                 545,
+                60,
+                542,
                 5,
               ],
             ],
@@ -728,36 +749,44 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    558,
+                    555,
                     40,
-                    539,
+                    536,
                     49,
                   ],
+                  [
+                    "new Promise",
+                    "",
+                    0,
+                    0,
+                    0,
+                    0,
+                  ],
                 ],
               },
               "stack": [
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "getData",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  541,
+                  538,
                   13,
-                  540,
+                  537,
                   5,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  547,
+                  544,
                   22,
-                  545,
+                  542,
                   5,
                 ],
               ],
@@ -776,9 +805,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  548,
-                  60,
                   545,
+                  60,
+                  542,
                   5,
                 ],
               ],
@@ -787,9 +816,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "InnerComponent",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                554,
-                40,
                 551,
+                40,
+                548,
                 5,
               ],
             ],
@@ -852,9 +881,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Object.<anonymous>",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                821,
+                850,
                 109,
-                808,
+                837,
                 80,
               ],
             ],
@@ -873,9 +902,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    821,
+                    850,
                     109,
-                    808,
+                    837,
                     80,
                   ],
                 ],
@@ -938,9 +967,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Object.<anonymous>",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                907,
+                936,
                 109,
-                898,
+                927,
                 94,
               ],
             ],
@@ -1011,9 +1040,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Object.<anonymous>",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                980,
+                1009,
                 109,
-                956,
+                985,
                 50,
               ],
             ],
@@ -1095,9 +1124,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Object.<anonymous>",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1064,
+                1093,
                 109,
-                1047,
+                1076,
                 63,
               ],
             ],
@@ -1114,17 +1143,17 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "fetchThirdParty",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                168,
+                167,
                 40,
-                166,
+                165,
                 3,
               ],
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1060,
+                1089,
                 24,
-                1059,
+                1088,
                 5,
               ],
             ],
@@ -1146,17 +1175,17 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "fetchThirdParty",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    168,
+                    167,
                     40,
-                    166,
+                    165,
                     3,
                   ],
                   [
                     "Component",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    1060,
+                    1089,
                     24,
-                    1059,
+                    1088,
                     5,
                   ],
                 ],
@@ -1165,25 +1194,25 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "getData",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1049,
+                  1078,
                   13,
-                  1048,
+                  1077,
                   5,
                 ],
                 [
                   "ThirdPartyComponent",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1055,
+                  1084,
                   24,
-                  1054,
+                  1083,
                   5,
                 ],
               ],
@@ -1202,17 +1231,17 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "fetchThirdParty",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  168,
+                  167,
                   40,
-                  166,
+                  165,
                   3,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1060,
+                  1089,
                   24,
-                  1059,
+                  1088,
                   5,
                 ],
               ],
@@ -1221,17 +1250,17 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "getData",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1049,
+                1078,
                 13,
-                1048,
+                1077,
                 5,
               ],
               [
                 "ThirdPartyComponent",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1055,
+                1084,
                 24,
-                1054,
+                1083,
                 5,
               ],
             ],
@@ -1256,17 +1285,17 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "fetchThirdParty",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    168,
+                    167,
                     40,
-                    166,
+                    165,
                     3,
                   ],
                   [
                     "Component",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    1060,
+                    1089,
                     24,
-                    1059,
+                    1088,
                     5,
                   ],
                 ],
@@ -1275,25 +1304,25 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "getData",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1050,
+                  1079,
                   13,
-                  1048,
+                  1077,
                   5,
                 ],
                 [
                   "ThirdPartyComponent",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1055,
+                  1084,
                   18,
-                  1054,
+                  1083,
                   5,
                 ],
               ],
@@ -1312,17 +1341,17 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "fetchThirdParty",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  168,
+                  167,
                   40,
-                  166,
+                  165,
                   3,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1060,
+                  1089,
                   24,
-                  1059,
+                  1088,
                   5,
                 ],
               ],
@@ -1331,17 +1360,17 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "getData",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1050,
+                1079,
                 13,
-                1048,
+                1077,
                 5,
               ],
               [
                 "ThirdPartyComponent",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1055,
+                1084,
                 18,
-                1054,
+                1083,
                 5,
               ],
             ],
@@ -1416,11 +1445,19 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Object.<anonymous>",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1380,
+                1409,
                 40,
-                1363,
+                1392,
                 62,
               ],
+              [
+                "new Promise",
+                "",
+                0,
+                0,
+                0,
+                0,
+              ],
             ],
           },
           {
@@ -1440,36 +1477,44 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    1380,
+                    1409,
                     40,
-                    1363,
+                    1392,
                     62,
                   ],
+                  [
+                    "new Promise",
+                    "",
+                    0,
+                    0,
+                    0,
+                    0,
+                  ],
                 ],
               },
               "stack": [
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "getData",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1365,
+                  1394,
                   13,
-                  1364,
+                  1393,
                   25,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1375,
+                  1404,
                   13,
-                  1374,
+                  1403,
                   5,
                 ],
               ],
@@ -1488,28 +1533,36 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Object.<anonymous>",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1380,
+                  1409,
                   40,
-                  1363,
+                  1392,
                   62,
                 ],
+                [
+                  "new Promise",
+                  "",
+                  0,
+                  0,
+                  0,
+                  0,
+                ],
               ],
             },
             "stack": [
               [
                 "getData",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1365,
+                1394,
                 13,
-                1364,
+                1393,
                 25,
               ],
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1375,
+                1404,
                 13,
-                1374,
+                1403,
                 5,
               ],
             ],
@@ -1529,9 +1582,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1376,
+                1405,
                 60,
-                1374,
+                1403,
                 5,
               ],
             ],
@@ -1553,36 +1606,44 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    1380,
+                    1409,
                     40,
-                    1363,
+                    1392,
                     62,
                   ],
+                  [
+                    "new Promise",
+                    "",
+                    0,
+                    0,
+                    0,
+                    0,
+                  ],
                 ],
               },
               "stack": [
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "getData",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1365,
+                  1394,
                   13,
-                  1364,
+                  1393,
                   25,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1375,
+                  1404,
                   13,
-                  1374,
+                  1403,
                   5,
                 ],
               ],
@@ -1601,9 +1662,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1376,
+                  1405,
                   60,
-                  1374,
+                  1403,
                   5,
                 ],
               ],
@@ -1612,9 +1673,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Child",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1370,
+                1399,
                 28,
-                1369,
+                1398,
                 5,
               ],
             ],
@@ -1685,11 +1746,19 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Object.<anonymous>",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1649,
+                1710,
                 40,
-                1633,
+                1694,
                 57,
               ],
+              [
+                "new Promise",
+                "",
+                0,
+                0,
+                0,
+                0,
+              ],
             ],
           },
           {
@@ -1709,36 +1778,44 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    1649,
+                    1710,
                     40,
-                    1633,
+                    1694,
                     57,
                   ],
+                  [
+                    "new Promise",
+                    "",
+                    0,
+                    0,
+                    0,
+                    0,
+                  ],
                 ],
               },
               "stack": [
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "getData",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1635,
+                  1696,
                   13,
-                  1634,
+                  1695,
                   25,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1644,
+                  1705,
                   23,
-                  1643,
+                  1704,
                   5,
                 ],
               ],
@@ -1757,28 +1834,36 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Object.<anonymous>",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1649,
+                  1710,
                   40,
-                  1633,
+                  1694,
                   57,
                 ],
+                [
+                  "new Promise",
+                  "",
+                  0,
+                  0,
+                  0,
+                  0,
+                ],
               ],
             },
             "stack": [
               [
                 "getData",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1635,
+                1696,
                 13,
-                1634,
+                1695,
                 25,
               ],
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1644,
+                1705,
                 23,
-                1643,
+                1704,
                 5,
               ],
             ],
@@ -1798,9 +1883,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1645,
+                1706,
                 60,
-                1643,
+                1704,
                 5,
               ],
             ],
@@ -1819,36 +1904,44 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    1649,
+                    1710,
                     40,
-                    1633,
+                    1694,
                     57,
                   ],
+                  [
+                    "new Promise",
+                    "",
+                    0,
+                    0,
+                    0,
+                    0,
+                  ],
                 ],
               },
               "stack": [
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "getData",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1635,
+                  1696,
                   13,
-                  1634,
+                  1695,
                   25,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1644,
+                  1705,
                   23,
-                  1643,
+                  1704,
                   5,
                 ],
               ],
@@ -1927,11 +2020,19 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Object.<anonymous>",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1891,
+                1984,
                 40,
-                1873,
+                1966,
                 80,
               ],
+              [
+                "new Promise",
+                "",
+                0,
+                0,
+                0,
+                0,
+              ],
             ],
           },
           {
@@ -1951,36 +2052,44 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    1891,
+                    1984,
                     40,
-                    1873,
+                    1966,
                     80,
                   ],
+                  [
+                    "new Promise",
+                    "",
+                    0,
+                    0,
+                    0,
+                    0,
+                  ],
                 ],
               },
               "stack": [
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "delayTrice",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1881,
+                  1974,
                   13,
-                  1879,
+                  1972,
                   5,
                 ],
                 [
                   "Bar",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1886,
+                  1979,
                   13,
-                  1885,
+                  1978,
                   5,
                 ],
               ],
@@ -1999,28 +2108,36 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Object.<anonymous>",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1891,
+                  1984,
                   40,
-                  1873,
+                  1966,
                   80,
                 ],
+                [
+                  "new Promise",
+                  "",
+                  0,
+                  0,
+                  0,
+                  0,
+                ],
               ],
             },
             "stack": [
               [
                 "delayTrice",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1881,
+                1974,
                 13,
-                1879,
+                1972,
                 5,
               ],
               [
                 "Bar",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1886,
+                1979,
                 13,
-                1885,
+                1978,
                 5,
               ],
             ],
@@ -2042,44 +2159,52 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    1891,
+                    1984,
                     40,
-                    1873,
+                    1966,
                     80,
                   ],
+                  [
+                    "new Promise",
+                    "",
+                    0,
+                    0,
+                    0,
+                    0,
+                  ],
                 ],
               },
               "stack": [
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "delayTwice",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1875,
+                  1968,
                   13,
-                  1874,
+                  1967,
                   5,
                 ],
                 [
                   "delayTrice",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1880,
+                  1973,
                   15,
-                  1879,
+                  1972,
                   5,
                 ],
                 [
                   "Bar",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1886,
+                  1979,
                   13,
-                  1885,
+                  1978,
                   5,
                 ],
               ],
@@ -2098,36 +2223,44 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Object.<anonymous>",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1891,
+                  1984,
                   40,
-                  1873,
+                  1966,
                   80,
                 ],
+                [
+                  "new Promise",
+                  "",
+                  0,
+                  0,
+                  0,
+                  0,
+                ],
               ],
             },
             "stack": [
               [
                 "delayTwice",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1875,
+                1968,
                 13,
-                1874,
+                1967,
                 5,
               ],
               [
                 "delayTrice",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1880,
+                1973,
                 15,
-                1879,
+                1972,
                 5,
               ],
               [
                 "Bar",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1886,
+                1979,
                 13,
-                1885,
+                1978,
                 5,
               ],
             ],
@@ -2149,28 +2282,36 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    1891,
+                    1984,
                     40,
-                    1873,
+                    1966,
                     80,
                   ],
+                  [
+                    "new Promise",
+                    "",
+                    0,
+                    0,
+                    0,
+                    0,
+                  ],
                 ],
               },
               "stack": [
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "delayTwice",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1876,
+                  1969,
                   13,
-                  1874,
+                  1967,
                   5,
                 ],
               ],
@@ -2189,20 +2330,28 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Object.<anonymous>",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  1891,
+                  1984,
                   40,
-                  1873,
+                  1966,
                   80,
                 ],
+                [
+                  "new Promise",
+                  "",
+                  0,
+                  0,
+                  0,
+                  0,
+                ],
               ],
             },
             "stack": [
               [
                 "delayTwice",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                1876,
+                1969,
                 13,
-                1874,
+                1967,
                 5,
               ],
             ],
@@ -2263,9 +2412,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Object.<anonymous>",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                2232,
+                2381,
                 109,
-                2221,
+                2370,
                 58,
               ],
             ],
@@ -2287,9 +2436,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    2232,
+                    2381,
                     109,
-                    2221,
+                    2370,
                     58,
                   ],
                 ],
@@ -2298,25 +2447,25 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "getData",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  2223,
+                  2372,
                   14,
-                  2222,
+                  2371,
                   5,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  2229,
+                  2378,
                   20,
-                  2228,
+                  2377,
                   5,
                 ],
               ],
@@ -2335,9 +2484,9 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Object.<anonymous>",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  2232,
+                  2381,
                   109,
-                  2221,
+                  2370,
                   58,
                 ],
               ],
@@ -2346,17 +2495,17 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "getData",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                2223,
+                2372,
                 23,
-                2222,
+                2371,
                 5,
               ],
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                2229,
+                2378,
                 20,
-                2228,
+                2377,
                 5,
               ],
             ],
@@ -2423,11 +2572,19 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Object.<anonymous>",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                2387,
+                2536,
                 40,
-                2375,
+                2524,
                 56,
               ],
+              [
+                "new Promise",
+                "",
+                0,
+                0,
+                0,
+                0,
+              ],
             ],
           },
           {
@@ -2447,28 +2604,36 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    2387,
+                    2536,
                     40,
-                    2375,
+                    2524,
                     56,
                   ],
+                  [
+                    "new Promise",
+                    "",
+                    0,
+                    0,
+                    0,
+                    0,
+                  ],
                 ],
               },
               "stack": [
                 [
                   "delay",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  161,
-                  12,
                   160,
+                  12,
+                  159,
                   3,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  2383,
+                  2532,
                   20,
-                  2382,
+                  2531,
                   5,
                 ],
               ],
@@ -2487,20 +2652,28 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Object.<anonymous>",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  2387,
+                  2536,
                   40,
-                  2375,
+                  2524,
                   56,
                 ],
+                [
+                  "new Promise",
+                  "",
+                  0,
+                  0,
+                  0,
+                  0,
+                ],
               ],
             },
             "stack": [
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                2383,
+                2532,
                 20,
-                2382,
+                2531,
                 5,
               ],
             ],
@@ -2581,11 +2754,19 @@ describe('ReactFlightAsyncDebugInfo', () => {
               [
                 "Object.<anonymous>",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                2540,
+                2713,
                 40,
-                2519,
+                2692,
                 42,
               ],
+              [
+                "new Promise",
+                "",
+                0,
+                0,
+                0,
+                0,
+              ],
             ],
           },
           {
@@ -2605,28 +2786,36 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    2540,
+                    2713,
                     40,
-                    2519,
+                    2692,
                     42,
                   ],
+                  [
+                    "new Promise",
+                    "",
+                    0,
+                    0,
+                    0,
+                    0,
+                  ],
                 ],
               },
               "stack": [
                 [
                   "",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  2526,
+                  2699,
                   15,
-                  2525,
+                  2698,
                   15,
                 ],
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  2535,
+                  2708,
                   19,
-                  2534,
+                  2707,
                   5,
                 ],
               ],
@@ -2645,28 +2834,36 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Object.<anonymous>",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  2540,
+                  2713,
                   40,
-                  2519,
+                  2692,
                   42,
                 ],
+                [
+                  "new Promise",
+                  "",
+                  0,
+                  0,
+                  0,
+                  0,
+                ],
               ],
             },
             "stack": [
               [
                 "",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                2526,
+                2699,
                 15,
-                2525,
+                2698,
                 15,
               ],
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                2535,
+                2708,
                 19,
-                2534,
+                2707,
                 5,
               ],
             ],
@@ -2688,20 +2885,28 @@ describe('ReactFlightAsyncDebugInfo', () => {
                   [
                     "Object.<anonymous>",
                     "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                    2540,
+                    2713,
                     40,
-                    2519,
+                    2692,
                     42,
                   ],
+                  [
+                    "new Promise",
+                    "",
+                    0,
+                    0,
+                    0,
+                    0,
+                  ],
                 ],
               },
               "stack": [
                 [
                   "Component",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  2535,
+                  2708,
                   25,
-                  2534,
+                  2707,
                   5,
                 ],
               ],
@@ -2720,20 +2925,28 @@ describe('ReactFlightAsyncDebugInfo', () => {
                 [
                   "Object.<anonymous>",
                   "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                  2540,
+                  2713,
                   40,
-                  2519,
+                  2692,
                   42,
                 ],
+                [
+                  "new Promise",
+                  "",
+                  0,
+                  0,
+                  0,
+                  0,
+                ],
               ],
             },
             "stack": [
               [
                 "Component",
                 "/packages/react-server/src/__tests__/ReactFlightAsyncDebugInfo-test.js",
-                2535,
+                2708,
                 25,
-                2534,
+                2707,
                 5,
               ],
             ],