File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ var stackFrame = new StackFrame({
1919 isEval: true ,
2020 isNative: false ,
2121 source: ' ORIGINAL_STACK_LINE'
22+ evalOrigin: new StackFrame ({functionName: ' withinEval' , lineNumber: 2 , columnNumber: 43 })
2223});
2324
2425stackFrame .functionName // => "funName"
@@ -49,9 +50,13 @@ stackFrame.isEval // => true
4950stackFrame .setIsEval (false )
5051stackFrame .getIsEval () // => false
5152
52- stackFrame .isNative // => false
53+ stackFrame .isNative // => false
5354stackFrame .setIsNative (true )
54- stackFrame .getIsNative () // => true
55+ stackFrame .getIsNative () // => true
56+
57+ stackFrame .evalOrigin // => StackFrame({functionName: 'withinEval', lineNumber: ...})
58+ stackFrame .setEvalOrigin ({functionName: ' evalFn' , fileName: ' anonymous' })
59+ stackFrame .getEvalOrigin ().getFunctionName () // => 'evalFn'
5560
5661stackFrame .toString () // => 'funName(args)@http://localhost:3000/file.js:325:20'
5762```
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ declare namespace StackFrame {
1919 functionName ?: string ;
2020 source ?: string ;
2121 args ?: any [ ] ;
22+ evalOrigin ?: StackFrame ;
2223 }
2324}
2425
You can’t perform that action at this time.
0 commit comments