(thread: Thread, stack: Cdp.Runtime.StackTrace)
| 21 | private _lastFrameThread?: Thread; |
| 22 | |
| 23 | public static fromRuntime(thread: Thread, stack: Cdp.Runtime.StackTrace): StackTrace { |
| 24 | const result = new StackTrace(thread); |
| 25 | const callFrames = stack.callFrames; |
| 26 | |
| 27 | // Remove any frames on top that are within a log point. |
| 28 | while (callFrames.length && LogPointCompiler.isLogPointUrl(callFrames[0].url)) { |
| 29 | callFrames.splice(0, 1); |
| 30 | } |
| 31 | |
| 32 | for (const callFrame of stack.callFrames) |
| 33 | result._frames.push(StackFrame.fromRuntime(thread, callFrame)); |
| 34 | if (stack.parentId) { |
| 35 | result._asyncStackTraceId = stack.parentId; |
| 36 | console.assert(!stack.parent); |
| 37 | } else { |
| 38 | result._appendStackTrace(thread, stack.parent); |
| 39 | } |
| 40 | return result; |
| 41 | } |
| 42 | |
| 43 | public static fromDebugger( |
| 44 | thread: Thread, |
no test coverage detected