@@ -204,11 +204,13 @@ function findCalledFunctionNameFromStackTrace(
204204 const callsite = stack [ i ] ;
205205 const functionName = callsite [ 0 ] ;
206206 const url = devirtualizeURL ( callsite [ 1 ] ) ;
207+ const lineNumber = callsite [ 2 ] ;
208+ const columnNumber = callsite [ 3 ] ;
207209 if ( functionName === 'new Promise' ) {
208210 // Ignore Promise constructors.
209211 } else if ( url === 'node:internal/async_hooks' ) {
210212 // Ignore the stack frames from the async hooks themselves.
211- } else if ( filterStackFrame ( url , functionName ) ) {
213+ } else if ( filterStackFrame ( url , functionName , lineNumber , columnNumber ) ) {
212214 if ( bestMatch === '' ) {
213215 // If we had no good stack frames for internal calls, just use the last
214216 // first party function name.
@@ -236,7 +238,9 @@ function filterStackTrace(
236238 const callsite = stack [ i ] ;
237239 const functionName = callsite [ 0 ] ;
238240 const url = devirtualizeURL ( callsite [ 1 ] ) ;
239- if ( filterStackFrame ( url , functionName ) ) {
241+ const lineNumber = callsite [ 2 ] ;
242+ const columnNumber = callsite [ 3 ] ;
243+ if ( filterStackFrame ( url , functionName , lineNumber , columnNumber ) ) {
240244 // Use a clone because the Flight protocol isn't yet resilient to deduping
241245 // objects in the debug info. TODO: Support deduping stacks.
242246 const clone : ReactCallSite = ( callsite . slice ( 0 ) : any ) ;
@@ -466,7 +470,12 @@ export type Request = {
466470 // DEV-only
467471 completedDebugChunks : Array < Chunk | BinaryChunk > ,
468472 environmentName : ( ) => string ,
469- filterStackFrame : ( url : string , functionName : string ) => boolean ,
473+ filterStackFrame : (
474+ url : string ,
475+ functionName : string ,
476+ lineNumber : number ,
477+ columnNumber : number ,
478+ ) => boolean ,
470479 didWarnForKey : null | WeakSet < ReactComponentInfo > ,
471480 writtenDebugObjects : WeakMap < Reference , string > ,
472481 deferredDebugObjects : null | DeferredDebugStore ,
@@ -2180,7 +2189,14 @@ function visitAsyncNode(
21802189 const callsite = fullStack [ firstFrame ] ;
21812190 const functionName = callsite [ 0 ] ;
21822191 const url = devirtualizeURL ( callsite [ 1 ] ) ;
2183- isAwaitInUserspace = filterStackFrame ( url , functionName ) ;
2192+ const lineNumber = callsite [ 2 ] ;
2193+ const columnNumber = callsite [ 3 ] ;
2194+ isAwaitInUserspace = filterStackFrame (
2195+ url ,
2196+ functionName ,
2197+ lineNumber ,
2198+ columnNumber ,
2199+ ) ;
21842200 }
21852201 if ( ! isAwaitInUserspace ) {
21862202 // If this await was fully filtered out, then it was inside third party code
0 commit comments