(thread: Thread, stackTrace: Cdp.Runtime.StackTrace | undefined)
| 190 | } |
| 191 | |
| 192 | private _appendStackTrace(thread: Thread, stackTrace: Cdp.Runtime.StackTrace | undefined) { |
| 193 | console.assert(!stackTrace || !this._asyncStackTraceId); |
| 194 | |
| 195 | while (stackTrace) { |
| 196 | if (stackTrace.description === 'async function' && stackTrace.callFrames.length) { |
| 197 | stackTrace.callFrames.shift(); |
| 198 | } |
| 199 | |
| 200 | if (stackTrace.callFrames.length) { |
| 201 | this._appendFrame(new AsyncSeparator(stackTrace.description || 'async')); |
| 202 | for (const callFrame of stackTrace.callFrames) { |
| 203 | this._appendFrame(StackFrame.fromRuntime(thread, callFrame, true)); |
| 204 | } |
| 205 | } |
| 206 | |
| 207 | if (stackTrace.parentId) { |
| 208 | this._asyncStackTraceId = stackTrace.parentId; |
| 209 | console.assert(!stackTrace.parent); |
| 210 | } |
| 211 | |
| 212 | stackTrace = stackTrace.parent; |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | private _spliceFrames(index: number, deleteCount: number, ...frames: FrameElement[]) { |
| 217 | this.frames.splice(index, deleteCount, ...frames); |
no test coverage detected