Merge branch 'master' of git.labs.intellij.net:idea/community

This commit is contained in:
Konstantin Bulenkov
2010-11-12 16:15:40 +03:00
2 changed files with 16 additions and 17 deletions
@@ -19,7 +19,6 @@ import com.intellij.debugger.jdi.ThreadReferenceProxyImpl;
import com.intellij.openapi.diagnostic.Logger;
import com.sun.jdi.InternalException;
import com.sun.jdi.ObjectCollectedException;
import com.sun.jdi.ThreadReference;
import com.sun.jdi.event.EventSet;
import com.sun.jdi.request.EventRequest;
@@ -116,19 +115,19 @@ public class SuspendManagerImpl implements SuspendManager {
LOG.debug("Start resuming eventSet " + set.toString() + " suspendPolicy = " + set.suspendPolicy() + ",size = " + set.size());
}
myDebugProcess.logThreads();
final ThreadReferenceProxyImpl thread = getThread();
if (thread != null) { // check that thread is suspended at the moment
try {
if (!thread.isSuspended()) {
final int status = thread.status();
if ((status != ThreadReference.THREAD_STATUS_ZOMBIE) && (status != ThreadReference.THREAD_STATUS_NOT_STARTED) && (status != ThreadReference.THREAD_STATUS_UNKNOWN)) {
LOG.error("Context thread must be suspended");
}
}
}
catch (ObjectCollectedException ignored) {}
}
//final ThreadReferenceProxyImpl thread = getThread();
//
//if (thread != null) { // check that thread is suspended at the moment
// try {
// if (!thread.isSuspended()) {
// final int status = thread.status();
// if ((status != ThreadReference.THREAD_STATUS_ZOMBIE) && (status != ThreadReference.THREAD_STATUS_NOT_STARTED) && (status != ThreadReference.THREAD_STATUS_UNKNOWN)) {
// LOG.error("Context thread must be suspended");
// }
// }
// }
// catch (ObjectCollectedException ignored) {}
//}
int attempts = 5;
while (--attempts > 0) {
@@ -18,7 +18,6 @@ package com.intellij.execution.ui;
import com.intellij.execution.process.ProcessHandler;
import com.intellij.ide.DataManager;
import com.intellij.openapi.actionSystem.DataProvider;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.Disposer;
import com.intellij.ui.content.Content;
@@ -44,7 +43,6 @@ public class RunContentDescriptor {
public RunContentDescriptor(final ExecutionConsole executionConsole,
final ProcessHandler processHandler, final JComponent component, final String displayName, final Icon icon) {
LOG.assertTrue(executionConsole != null || ApplicationManager.getApplication().isUnitTestMode());
myExecutionConsole = executionConsole;
myProcessHandler = processHandler;
myComponent = component;
@@ -71,7 +69,9 @@ public class RunContentDescriptor {
}
public void dispose() {
Disposer.dispose(myExecutionConsole);
if (myExecutionConsole != null) {
Disposer.dispose(myExecutionConsole);
}
}
@Nullable