Skip to content

Commit 847e391

Browse files
committed
allow parsing frames with eval url
1 parent e9f2055 commit 847e391

1 file changed

Lines changed: 20 additions & 9 deletions

File tree

front_end/panels/console/ErrorStackParser.ts

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,27 @@ export interface ParsedErrorFrame {
2222
}
2323

2424
export type SpecialHermesStackTraceFrameTypes =
25-
// functions implemented in c++.
26-
// TODO: these might be enhanced to include the C++ loc for the frame
27-
// so that a debugger could stitch together a hybrid cross-language call stack
25+
// e.g "(native)"- Functions implemented on the native side.
26+
// TODO: Might be enhanced to include the native (C++/Java/etc) loc
27+
// for the frame so that a debugger could stitch together a
28+
// hybrid cross-language call stack
2829
'native' |
29-
// frames with empty url
30-
// TODO: these seem to be happening due to a bug that needs to be investigated
30+
// e.g "(eval:1:2)"- Seem to be reported when there's a
31+
// ReferenceError or TypeError during the initial bundle code execution.
32+
// TODO: Understand exactly where these originate from and what further work
33+
// should be done in regards to them
34+
'eval' |
35+
// e.g "(:3:4)"- Frames with empty url
36+
// TODO: Seems to be happening due to a bug that needs to be investigated
3137
// and produce an actual script URL instead
3238
'address at' |
33-
// frames pointing to a bytecode locations
34-
// TODO: these could be symbolicated and link to source files with the help of
39+
// e.g "(address at InternalBytecode.js:5:6)"- Frames pointing to bytecode locations
40+
// TODO: Could be symbolicated and link to source files with the help of
3541
// a bytecode source maps once they are available.
3642
'empty url' |
37-
// frames collepsed in the middle of a stack trace for very long stack traces
38-
'skipping x frames';
43+
// e.g " ... skipping 7 frames" - Frames collapsed in the middle of a stack trace
44+
// for very long stack traces
45+
'skipping x frames' ;
3946

4047
function getSpecialHermesStackTraceFrameType({
4148
url,
@@ -46,6 +53,10 @@ function getSpecialHermesStackTraceFrameType({
4653
return 'native';
4754
}
4855

56+
if (url === 'eval') {
57+
return 'eval';
58+
}
59+
4960
if (url === '') {
5061
return 'empty url';
5162
}

0 commit comments

Comments
 (0)