MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / callFrameToStackFrame

Function callFrameToStackFrame

packages/core/src/utils/anr.ts:72–91  ·  view source on GitHub ↗
(
  frame: CallFrame,
  url: string | undefined,
  getModuleFromFilename: (filename: string | undefined) => string | undefined,
)

Source from the content-addressed store, hash-verified

70 * Converts Debugger.CallFrame to Sentry StackFrame
71 */
72export function callFrameToStackFrame(
73 frame: CallFrame,
74 url: string | undefined,
75 getModuleFromFilename: (filename: string | undefined) => string | undefined,
76): StackFrame {
77 const filename = url ? url.replace(/^file:\/\//, '') : undefined;
78
79 // CallFrame row/col are 0 based, whereas StackFrame are 1 based
80 const colno = frame.location.columnNumber ? frame.location.columnNumber + 1 : undefined;
81 const lineno = frame.location.lineNumber ? frame.location.lineNumber + 1 : undefined;
82
83 return {
84 filename,
85 module: getModuleFromFilename(filename),
86 function: frame.functionName || UNKNOWN_FUNCTION,
87 colno,
88 lineno,
89 in_app: filename ? filenameIsInApp(filename) : undefined,
90 };
91}

Callers 1

worker.tsFile · 0.90

Calls 2

filenameIsInAppFunction · 0.90
replaceMethod · 0.80

Tested by

no test coverage detected