(vmState, processedStack)
| 38 | } |
| 39 | |
| 40 | static extractType(vmState, processedStack) { |
| 41 | if (processedStack.length == 0 || vmState == Profile.VMState.IDLE) { |
| 42 | return 'Idle'; |
| 43 | } |
| 44 | const topOfStack = processedStack[0]; |
| 45 | if (typeof topOfStack === 'number' || typeof topOfStack === 'bigint') { |
| 46 | // TODO(cbruni): Handle VmStack and native ticks better. |
| 47 | return 'Other'; |
| 48 | } |
| 49 | if (vmState != Profile.VMState.JS) { |
| 50 | topOfStack.vmState = vmState; |
| 51 | } |
| 52 | return this.extractCodeEntryType(topOfStack); |
| 53 | } |
| 54 | |
| 55 | static extractCodeEntryType(entry) { |
| 56 | if (entry?.state !== undefined) { |
no test coverage detected