discord-jadx/app/src/main/java/s/a/m.java
2021-06-27 22:44:35 +02:00

74 lines
2.1 KiB
Java

package s.a;
import c.d.b.a.a;
import java.util.Objects;
import java.util.concurrent.CancellationException;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlinx.coroutines.Job;
import s.a.a.f;
import s.a.a.g;
import s.a.a.s;
/* compiled from: JobSupport.kt */
public final class m extends b1<Job> {
public final j<?> m;
public m(Job job, j<?> jVar) {
super(job);
this.m = jVar;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Throwable th) {
q(th);
return Unit.a;
}
@Override // s.a.w
public void q(Throwable th) {
j<?> jVar = this.m;
J j = this.l;
Objects.requireNonNull(jVar);
CancellationException p = j.p();
boolean z2 = true;
boolean z3 = false;
if (jVar.k == 2) {
Continuation<?> continuation = jVar.o;
if (!(continuation instanceof f)) {
continuation = null;
}
f fVar = (f) continuation;
if (fVar != null) {
while (true) {
Object obj = fVar._reusableCancellableContinuation;
s sVar = g.b;
if (!d0.z.d.m.areEqual(obj, sVar)) {
if (obj instanceof Throwable) {
break;
} else if (f.l.compareAndSet(fVar, obj, null)) {
z2 = false;
break;
}
} else if (f.l.compareAndSet(fVar, sVar, p)) {
break;
}
}
z3 = z2;
}
}
if (!z3) {
jVar.j(p);
jVar.s();
}
}
@Override // s.a.a.j
public String toString() {
StringBuilder L = a.L("ChildContinuation[");
L.append(this.m);
L.append(']');
return L.toString();
}
}