mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
[debugger] Check isInSuspendCommand in isEvaluationPossible
GitOrigin-RevId: 2de5dc5741d80242fd70e68fec672782b7f53fcc
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4de1676530
commit
d40069a7cb
@@ -2803,8 +2803,15 @@ public abstract class DebugProcessImpl extends UserDataHolderBase implements Deb
|
||||
|| DebuggerImplicitEvaluationContextUtil.getImplicitEvaluationThread(this) != null;
|
||||
}
|
||||
|
||||
public static boolean isInSuspendCommand(SuspendContextImpl suspendContext) {
|
||||
DebuggerManagerThreadImpl.assertIsManagerThread();
|
||||
DebuggerCommandImpl command = DebuggerManagerThreadImpl.getCurrentCommand();
|
||||
return command instanceof SuspendContextCommandImpl suspendContextCommand
|
||||
&& suspendContextCommand.getSuspendContext() == suspendContext;
|
||||
}
|
||||
|
||||
public boolean isEvaluationPossible(SuspendContextImpl suspendContext) {
|
||||
return mySuspendManager.hasPausedContext(suspendContext);
|
||||
return isInSuspendCommand(suspendContext) && mySuspendManager.hasPausedContext(suspendContext);
|
||||
}
|
||||
|
||||
public void startWatchingMethodReturn(ThreadReferenceProxyImpl thread) {
|
||||
|
||||
@@ -572,8 +572,7 @@ public abstract class ExecutionWithDebuggerToolsTestCase extends ExecutionTestCa
|
||||
@Override
|
||||
public void paused(SuspendContextImpl suspendContext) {
|
||||
// Need to add SuspendContextCommandImpl because the stepping pause is not now in SuspendContextCommandImpl
|
||||
if (suspendContext.myInProgress) { // already inside SuspendContextCommand
|
||||
assertTrue(DebuggerManagerThreadImpl.getCurrentCommand() instanceof SuspendContextCommandImpl);
|
||||
if (DebugProcessImpl.isInSuspendCommand(suspendContext)) {
|
||||
pausedImpl(suspendContext);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -150,7 +150,7 @@ private fun initializeThreadState(suspendContext: SuspendContextImpl): ObjectRef
|
||||
private fun booleanValue(suspendContext: SuspendContextImpl, b: Boolean): BooleanValue = suspendContext.virtualMachineProxy.mirrorOf(b)
|
||||
|
||||
private fun <T> invokeInSuspendCommand(suspendContext: SuspendContextImpl, action: () -> T): T? {
|
||||
if (DebuggerManagerThreadImpl.getCurrentCommand() is SuspendContextCommandImpl) {
|
||||
if (DebugProcessImpl.isInSuspendCommand(suspendContext)) {
|
||||
return action()
|
||||
}
|
||||
var result: T? = null
|
||||
|
||||
Reference in New Issue
Block a user