Skip to content

Commit e7ecb7c

Browse files
committed
allow parsing stack traces that end with "skipping x frames"
1 parent 875a31a commit e7ecb7c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

front_end/panels/console/ErrorStackParser.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface ParsedErrorFrame {
2121
};
2222
}
2323

24-
export type SpecialHermesStackTraceFrameTypes = 'native' | 'address at' | 'empty url';
24+
export type SpecialHermesStackTraceFrameTypes = 'native' | 'address at' | 'empty url' | 'skipping x frames';
2525

2626
function getSpecialHermesStackTraceFrameType({
2727
url,
@@ -77,6 +77,16 @@ export function parseSourcePositionsFromErrorStack(
7777
const match = /^\s*at\s(async\s)?/.exec(line);
7878
if (!match) {
7979
if (linkInfos.length && linkInfos[linkInfos.length - 1].isCallFrame) {
80+
if (/^\s*... skipping \d+ frames$/.exec(line)) {
81+
if (!linkInfos[linkInfos.length - 1].link) {
82+
// Combine builtin frames.
83+
linkInfos[linkInfos.length - 1].line += `\n${line}`;
84+
} else {
85+
linkInfos.push({line, isCallFrame: false});
86+
}
87+
specialHermesFramesParsed.add('skipping x frames');
88+
continue;
89+
}
8090
Host.rnPerfMetrics.stackTraceSymbolicationFailed(stack, line, '"at (url)" not found');
8191
return null;
8292
}

0 commit comments

Comments
 (0)