(
request: Request,
id: number,
counter: {objectLimit: number},
thenable: Thenable<any>,
)
| 948 | } |
| 949 | |
| 950 | function emitRequestedDebugThenable( |
| 951 | request: Request, |
| 952 | id: number, |
| 953 | counter: {objectLimit: number}, |
| 954 | thenable: Thenable<any>, |
| 955 | ): void { |
| 956 | thenable.then( |
| 957 | value => { |
| 958 | if (request.status === ABORTING) { |
| 959 | emitDebugHaltChunk(request, id); |
| 960 | enqueueFlush(request); |
| 961 | return; |
| 962 | } |
| 963 | emitOutlinedDebugModelChunk(request, id, counter, value); |
| 964 | enqueueFlush(request); |
| 965 | }, |
| 966 | reason => { |
| 967 | if (request.status === ABORTING) { |
| 968 | emitDebugHaltChunk(request, id); |
| 969 | enqueueFlush(request); |
| 970 | return; |
| 971 | } |
| 972 | // We don't log these errors since they didn't actually throw into Flight. |
| 973 | const digest = ''; |
| 974 | emitErrorChunk(request, id, digest, reason, true, null); |
| 975 | enqueueFlush(request); |
| 976 | }, |
| 977 | ); |
| 978 | } |
| 979 | |
| 980 | function serializeThenable( |
| 981 | request: Request, |
no test coverage detected