[debugger] reenable multithreaded unit test

Also make ResumeCommmand resume the given thread and not the current one.

GitOrigin-RevId: 4197c705c10a09726b1ecf3f805bebba127f8a41
This commit is contained in:
Vladimir Parfinenko
2023-03-30 15:10:56 +02:00
committed by intellij-monorepo-bot
parent 9ebbfb0c44
commit e452f4fc2f
2 changed files with 4 additions and 2 deletions

View File

@@ -1875,8 +1875,8 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
public ResumeCommand(SuspendContextImpl suspendContext) {
super(suspendContext);
final ThreadReferenceProxyImpl contextThread = getDebuggerContext().getThreadProxy();
myContextThread = contextThread != null ? contextThread : (suspendContext != null ? suspendContext.getThread() : null);
final ThreadReferenceProxyImpl thread = suspendContext != null ? suspendContext.getThread() : null;
myContextThread = thread != null ? thread : getDebuggerContext().getThreadProxy();
}
@Override

View File

@@ -63,11 +63,13 @@ public final class ThreadReferenceProxyImpl extends ObjectReferenceProxyImpl imp
return (VirtualMachineProxyImpl)myTimer;
}
@NotNull
public String name() {
checkValid();
if (myName == null) {
try {
myName = getThreadReference().name();
LOG.assertTrue(myName != null);
}
catch (ObjectCollectedException ignored) {
myName = "";