MCPcopy Index your code
hub / github.com/react/react / hasUnfilteredFrame

Function hasUnfilteredFrame

packages/react-server/src/ReactFlightServer.js:296–317  ·  view source on GitHub ↗
(request: Request, stack: ReactStackTrace)

Source from the content-addressed store, hash-verified

294}
295
296function 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
319function isPromiseAwaitInternal(url: string, functionName: string): boolean {
320 // Various internals of the JS VM can await internally on a Promise. If those are at

Callers 1

visitAsyncNodeFunction · 0.85

Calls 2

devirtualizeURLFunction · 0.85
filterStackFrameFunction · 0.50

Tested by

no test coverage detected