(request: Request, stack: ReactStackTrace)
| 294 | } |
| 295 | |
| 296 | function hasUnfilteredFrame(request: Request, stack: ReactStackTrace): boolean { |
| 297 | const filterStackFrame = request.filterStackFrame; |
| 298 | for (let i = 0; i < stack.length; i++) { |
| 299 | const callsite = stack[i]; |
| 300 | const functionName = callsite[0]; |
| 301 | const url = devirtualizeURL(callsite[1]); |
| 302 | const lineNumber = callsite[2]; |
| 303 | const columnNumber = callsite[3]; |
| 304 | // Ignore async stack frames because they're not "real". We'd expect to have at least |
| 305 | // one non-async frame if we're actually executing inside a first party function. |
| 306 | // Otherwise we might just be in the resume of a third party function that resumed |
| 307 | // inside a first party stack. |
| 308 | const isAsync = callsite[6]; |
| 309 | if ( |
| 310 | !isAsync && |
| 311 | filterStackFrame(url, functionName, lineNumber, columnNumber) |
| 312 | ) { |
| 313 | return true; |
| 314 | } |
| 315 | } |
| 316 | return false; |
| 317 | } |
| 318 | |
| 319 | function isPromiseAwaitInternal(url: string, functionName: string): boolean { |
| 320 | // Various internals of the JS VM can await internally on a Promise. If those are at |
no test coverage detected