mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 247010 - RejectedExecutionException when launch is removed
This commit is contained in:
parent
41c8b18397
commit
a980785a88
3 changed files with 15 additions and 7 deletions
|
@ -60,11 +60,13 @@ public class AbstractDebugVMAdapter extends AbstractDMVMAdapter
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dispose() {
|
public void dispose() {
|
||||||
fController.getExecutor().execute(new DsfRunnable() {
|
if (!fController.getExecutor().isShutdown()) {
|
||||||
public void run() {
|
fController.getExecutor().execute(new DsfRunnable() {
|
||||||
fController.removeSteppingControlParticipant(AbstractDebugVMAdapter.this);
|
public void run() {
|
||||||
}
|
fController.removeSteppingControlParticipant(AbstractDebugVMAdapter.this);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,6 +187,10 @@ public class PDAAdapterFactory implements IAdapterFactory, ILaunchesListener2
|
||||||
|
|
||||||
PDALaunch launch = (PDALaunch)adaptableObject;
|
PDALaunch launch = (PDALaunch)adaptableObject;
|
||||||
|
|
||||||
|
// check for valid session
|
||||||
|
DsfSession session = launch.getSession();
|
||||||
|
if (session == null || !session.isActive()) return null;
|
||||||
|
|
||||||
// Find the correct set of adapters based on the launch. If not found
|
// Find the correct set of adapters based on the launch. If not found
|
||||||
// it means that we have a new launch, and we have to create a
|
// it means that we have a new launch, and we have to create a
|
||||||
// new set of adapters.
|
// new set of adapters.
|
||||||
|
|
|
@ -208,11 +208,13 @@ public class GdbAdapterFactory
|
||||||
|
|
||||||
GdbLaunch launch = (GdbLaunch)adaptableObject;
|
GdbLaunch launch = (GdbLaunch)adaptableObject;
|
||||||
|
|
||||||
|
// check for valid session
|
||||||
|
DsfSession session = launch.getSession();
|
||||||
|
if (session == null || !session.isActive()) return null;
|
||||||
|
|
||||||
// Find the correct set of adapters based on the launch session-ID. If not found
|
// Find the correct set of adapters based on the launch session-ID. If not found
|
||||||
// it means that we have a new launch and new session, and we have to create a
|
// it means that we have a new launch and new session, and we have to create a
|
||||||
// new set of adapters.
|
// new set of adapters.
|
||||||
DsfSession session = launch.getSession();
|
|
||||||
if (session == null) return null;
|
|
||||||
|
|
||||||
SessionAdapterSet adapterSet;
|
SessionAdapterSet adapterSet;
|
||||||
synchronized(fgLaunchAdapterSets) {
|
synchronized(fgLaunchAdapterSets) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue