mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-63378 - fixed leaking contexts
This commit is contained in:
@@ -114,6 +114,13 @@ public class SuspendManagerImpl implements SuspendManager {
|
||||
return suspendContext;
|
||||
}
|
||||
|
||||
public SuspendContextImpl createDummyContext(int suspendPolicy) {
|
||||
return new SuspendContextImpl(myDebugProcess, suspendPolicy, 0, null) {
|
||||
@Override
|
||||
protected void resumeImpl() {}
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuspendContextImpl pushSuspendContext(final EventSet set) {
|
||||
SuspendContextImpl suspendContext = new SuspendContextImpl(myDebugProcess, set.suspendPolicy(), set.size(), set) {
|
||||
|
||||
@@ -656,7 +656,7 @@ public class DebuggerSession implements AbstractDebuggerSession {
|
||||
if (suspendContext != null
|
||||
&& suspendContext.getSuspendPolicy() == EventRequest.SUSPEND_EVENT_THREAD
|
||||
&& isSteppingThrough(suspendContext.getThread())) {
|
||||
context = suspendManager.pushSuspendContext(suspendContext.getSuspendPolicy(), 0);
|
||||
context = ((SuspendManagerImpl)suspendManager).createDummyContext(suspendContext.getSuspendPolicy());
|
||||
context.setThread(suspendContext.getThread().getThreadReference());
|
||||
}
|
||||
final SuspendContextImpl currentContext = context;
|
||||
|
||||
Reference in New Issue
Block a user