[coroutine] Exception fixed for SUSPEND coroutines.

GitOrigin-RevId: 1288735a0a5593b9969d625a83c46b1212c9b018
This commit is contained in:
Vladimir Ilmov
2020-01-20 20:20:58 +01:00
committed by intellij-monorepo-bot
parent 7d4818aaf9
commit ebe1c7e426

View File

@@ -74,7 +74,7 @@ class CoroutineBuilder(val suspendContext: XSuspendContext) {
} else if ((coroutine.state == CoroutineInfoData.State.SUSPENDED || coroutine.activeThread == null) && coroutine.lastObservedFrameFieldRef is ObjectReference) {
// to get frames from CoroutineInfo anyway
// the thread is paused on breakpoint - it has at least one frame
val suspendedStackTrace = coroutine.stackTrace.take(creationFrameSeparatorIndex + 1)
val suspendedStackTrace = coroutine.stackTrace.take(creationFrameSeparatorIndex)
for (suspendedFrame in suspendedStackTrace) {
val suspendedXStackFrame = stackFrame(positionManager, firstSuspendedStackFrameProxyImpl, suspendedFrame)