2021-11-08 18:25:28 +00:00
|
|
|
package d0.w.i.a;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
2021-11-08 18:25:28 +00:00
|
|
|
import d0.k;
|
|
|
|
import d0.l;
|
|
|
|
import d0.w.h.c;
|
|
|
|
import d0.z.d.m;
|
2021-06-27 20:44:35 +00:00
|
|
|
import java.io.Serializable;
|
|
|
|
import kotlin.Unit;
|
|
|
|
import kotlin.coroutines.Continuation;
|
|
|
|
import kotlin.coroutines.jvm.internal.CoroutineStackFrame;
|
|
|
|
/* compiled from: ContinuationImpl.kt */
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public abstract class a implements Continuation<Object>, CoroutineStackFrame, Serializable {
|
|
|
|
private final Continuation<Object> completion;
|
|
|
|
|
|
|
|
public a(Continuation<Object> continuation) {
|
|
|
|
this.completion = continuation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
|
|
|
m.checkNotNullParameter(continuation, "completion");
|
|
|
|
throw new UnsupportedOperationException("create(Any?;Continuation) has not been overridden");
|
|
|
|
}
|
|
|
|
|
|
|
|
public Continuation<Unit> create(Continuation<?> continuation) {
|
|
|
|
m.checkNotNullParameter(continuation, "completion");
|
|
|
|
throw new UnsupportedOperationException("create(Continuation) has not been overridden");
|
|
|
|
}
|
|
|
|
|
|
|
|
public CoroutineStackFrame getCallerFrame() {
|
|
|
|
Continuation<Object> continuation = this.completion;
|
|
|
|
if (!(continuation instanceof CoroutineStackFrame)) {
|
|
|
|
continuation = null;
|
|
|
|
}
|
|
|
|
return (CoroutineStackFrame) continuation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public final Continuation<Object> getCompletion() {
|
|
|
|
return this.completion;
|
|
|
|
}
|
|
|
|
|
|
|
|
public StackTraceElement getStackTraceElement() {
|
|
|
|
return f.getStackTraceElement(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
public abstract Object invokeSuspend(Object obj);
|
|
|
|
|
|
|
|
public void releaseIntercepted() {
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // kotlin.coroutines.Continuation
|
|
|
|
public final void resumeWith(Object obj) {
|
2022-03-02 20:59:20 +00:00
|
|
|
Object invokeSuspend;
|
2021-06-27 20:44:35 +00:00
|
|
|
a aVar = this;
|
|
|
|
while (true) {
|
|
|
|
g.probeCoroutineResumed(aVar);
|
|
|
|
Continuation<Object> continuation = aVar.completion;
|
|
|
|
m.checkNotNull(continuation);
|
|
|
|
try {
|
2022-03-02 20:59:20 +00:00
|
|
|
invokeSuspend = aVar.invokeSuspend(obj);
|
|
|
|
} catch (Throwable th) {
|
|
|
|
k.a aVar2 = k.j;
|
|
|
|
obj = k.m72constructorimpl(l.createFailure(th));
|
|
|
|
}
|
|
|
|
if (invokeSuspend != c.getCOROUTINE_SUSPENDED()) {
|
|
|
|
k.a aVar3 = k.j;
|
|
|
|
obj = k.m72constructorimpl(invokeSuspend);
|
|
|
|
aVar.releaseIntercepted();
|
|
|
|
if (continuation instanceof a) {
|
|
|
|
aVar = (a) continuation;
|
2021-06-27 20:44:35 +00:00
|
|
|
} else {
|
2022-03-02 20:59:20 +00:00
|
|
|
continuation.resumeWith(obj);
|
2021-06-27 20:44:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2022-03-02 20:59:20 +00:00
|
|
|
} else {
|
|
|
|
return;
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public String toString() {
|
2022-03-22 15:40:06 +00:00
|
|
|
StringBuilder S = b.d.b.a.a.S("Continuation at ");
|
2021-06-27 20:44:35 +00:00
|
|
|
Object stackTraceElement = getStackTraceElement();
|
|
|
|
if (stackTraceElement == null) {
|
|
|
|
stackTraceElement = getClass().getName();
|
|
|
|
}
|
2022-03-22 15:40:06 +00:00
|
|
|
S.append(stackTraceElement);
|
|
|
|
return S.toString();
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|