1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

[292271] Protect against race condition due to asynchronously removing the service event listener

This commit is contained in:
Anton Leherbauer 2009-10-16 07:57:38 +00:00
parent 06b3823732
commit 54d204a985

View file

@ -280,7 +280,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
private BigInteger fGotoAddressPending= PC_UNKNOWN;
private BigInteger fFocusAddress= PC_UNKNOWN;
private int fBufferZone;
private IExecutionDMContext fTargetContext;
private volatile IExecutionDMContext fTargetContext;
private String fDebugSessionId;
private int fTargetFrame;
private DisassemblyIPAnnotation fPCAnnotation;
@ -2478,6 +2478,9 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
@DsfServiceEventHandler
public void handleEvent(IExitedDMEvent event) {
if (fTargetContext == null) {
return;
}
final IExecutionDMContext context= event.getDMContext();
if (context.equals(fTargetContext)
|| DMContexts.isAncestorOf(fTargetContext, context)) {
@ -2490,6 +2493,9 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
@DsfServiceEventHandler
public void handleEvent(ISuspendedDMEvent event) {
if (fTargetContext == null) {
return;
}
final IExecutionDMContext context= event.getDMContext();
if (context.equals(fTargetContext)
|| DMContexts.isAncestorOf(fTargetContext, context)) {
@ -2504,6 +2510,9 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
@DsfServiceEventHandler
public void handleEvent(IResumedDMEvent event) {
if (fTargetContext == null) {
return;
}
final IExecutionDMContext context= event.getDMContext();
if (context.equals(fTargetContext)
|| DMContexts.isAncestorOf(fTargetContext, context)) {