CoroutineAsyncStackTraceProvider stack corruption fix
This commit is contained in:
+5
-6
@@ -17,14 +17,13 @@ import org.jetbrains.kotlin.idea.debugger.evaluate.ExecutionContext
|
|||||||
|
|
||||||
class CoroutineAsyncStackTraceProvider : AsyncStackTraceProvider {
|
class CoroutineAsyncStackTraceProvider : AsyncStackTraceProvider {
|
||||||
|
|
||||||
override fun getAsyncStackTrace(stackFrame: JavaStackFrame, suspendContext: SuspendContextImpl): List<CoroutineAsyncStackFrameItem>? {
|
override fun getAsyncStackTrace(stackFrame: JavaStackFrame, suspendContext: SuspendContextImpl): List<CoroutineAsyncStackFrameItem>? =
|
||||||
val stackFrameList = hopelessAware { getAsyncStackTraceSafe(stackFrame.stackFrameProxy, suspendContext) } ?: emptyList()
|
getAsyncStackTrace(stackFrame, suspendContext as XSuspendContext)
|
||||||
return stackFrameList
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getAsyncStackTrace(stackFrame: JavaStackFrame, suspendContext: XSuspendContext): List<CoroutineAsyncStackFrameItem>? {
|
fun getAsyncStackTrace(stackFrame: JavaStackFrame, suspendContext: XSuspendContext): List<CoroutineAsyncStackFrameItem>? {
|
||||||
val stackFrameList = hopelessAware { getAsyncStackTraceSafe(stackFrame.stackFrameProxy, suspendContext) } ?: emptyList()
|
val stackFrameList = hopelessAware { getAsyncStackTraceSafe(stackFrame.stackFrameProxy, suspendContext) }
|
||||||
return stackFrameList
|
return if (stackFrameList == null || stackFrameList.isEmpty()) null else stackFrameList
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getAsyncStackTraceSafe(frameProxy: StackFrameProxyImpl, suspendContext: XSuspendContext): List<CoroutineAsyncStackFrameItem> {
|
fun getAsyncStackTraceSafe(frameProxy: StackFrameProxyImpl, suspendContext: XSuspendContext): List<CoroutineAsyncStackFrameItem> {
|
||||||
|
|||||||
Reference in New Issue
Block a user