You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Implement CoroutineStackFrame in CancellableContinuationImpl, DispatchedContinuation and ScopeCoroutine
* On coroutine resumption try to reflectively instantiate exception instance of the same type, but with augmented stacktrace
* Recover stacktrace by walking over CoroutineStackFrame
* Recover stacktrace on fast-path exceptions without CoroutineStackFrame walking to provide more context to an exception
* Unwrap exceptions when doing aggregation in JobSupport
* Add kill-switch to disable stacktrace recovery, introduce method to recover stacktrace on the exceptional fast-path
* Add `suspendCoroutineOrReturn` on exceptional fast-path in await in order to provide "real" stacktrace
Design rationale:
All recovery of *suspended* continuations takes place in Dispatched.kt file, the only place where all calls to "resume*" ends up, so we don't have to remember about stacktrace recovery in every primitive we are implementing. But to provide more accurate stacktraces we *have to* recover it on every fast-path for better debuggability.
Fixes#493
Copy file name to clipboardExpand all lines: binary-compatibility-validator/reference-public-api/kotlinx-coroutines-core.txt
+3-1
Original file line number
Diff line number
Diff line change
@@ -50,10 +50,12 @@ public final class kotlinx/coroutines/CancellableContinuation$DefaultImpls {
50
50
public static synthetic fun tryResume$default (Lkotlinx/coroutines/CancellableContinuation;Ljava/lang/Object;Ljava/lang/Object;ILjava/lang/Object;)Ljava/lang/Object;
51
51
}
52
52
53
-
public class kotlinx/coroutines/CancellableContinuationImpl : java/lang/Runnable, kotlinx/coroutines/CancellableContinuation {
53
+
public class kotlinx/coroutines/CancellableContinuationImpl : java/lang/Runnable, kotlin/coroutines/jvm/internal/CoroutineStackFrame, kotlinx/coroutines/CancellableContinuation {
54
54
public fun <init> (Lkotlin/coroutines/Continuation;I)V
55
55
public fun completeResume (Ljava/lang/Object;)V
56
+
public fun getCallerFrame ()Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;
56
57
public fun getContext ()Lkotlin/coroutines/CoroutineContext;
58
+
public fun getStackTraceElement ()Ljava/lang/StackTraceElement;
57
59
public fun getSuccessfulResult (Ljava/lang/Object;)Ljava/lang/Object;
0 commit comments