mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 12:55:40 +02:00
[292271] Protect against race condition due to asynchronously removing the service event listener
This commit is contained in:
parent
06b3823732
commit
54d204a985
1 changed files with 10 additions and 1 deletions
|
@ -280,7 +280,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
private BigInteger fGotoAddressPending= PC_UNKNOWN;
|
private BigInteger fGotoAddressPending= PC_UNKNOWN;
|
||||||
private BigInteger fFocusAddress= PC_UNKNOWN;
|
private BigInteger fFocusAddress= PC_UNKNOWN;
|
||||||
private int fBufferZone;
|
private int fBufferZone;
|
||||||
private IExecutionDMContext fTargetContext;
|
private volatile IExecutionDMContext fTargetContext;
|
||||||
private String fDebugSessionId;
|
private String fDebugSessionId;
|
||||||
private int fTargetFrame;
|
private int fTargetFrame;
|
||||||
private DisassemblyIPAnnotation fPCAnnotation;
|
private DisassemblyIPAnnotation fPCAnnotation;
|
||||||
|
@ -2478,6 +2478,9 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
|
|
||||||
@DsfServiceEventHandler
|
@DsfServiceEventHandler
|
||||||
public void handleEvent(IExitedDMEvent event) {
|
public void handleEvent(IExitedDMEvent event) {
|
||||||
|
if (fTargetContext == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final IExecutionDMContext context= event.getDMContext();
|
final IExecutionDMContext context= event.getDMContext();
|
||||||
if (context.equals(fTargetContext)
|
if (context.equals(fTargetContext)
|
||||||
|| DMContexts.isAncestorOf(fTargetContext, context)) {
|
|| DMContexts.isAncestorOf(fTargetContext, context)) {
|
||||||
|
@ -2490,6 +2493,9 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
|
|
||||||
@DsfServiceEventHandler
|
@DsfServiceEventHandler
|
||||||
public void handleEvent(ISuspendedDMEvent event) {
|
public void handleEvent(ISuspendedDMEvent event) {
|
||||||
|
if (fTargetContext == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final IExecutionDMContext context= event.getDMContext();
|
final IExecutionDMContext context= event.getDMContext();
|
||||||
if (context.equals(fTargetContext)
|
if (context.equals(fTargetContext)
|
||||||
|| DMContexts.isAncestorOf(fTargetContext, context)) {
|
|| DMContexts.isAncestorOf(fTargetContext, context)) {
|
||||||
|
@ -2504,6 +2510,9 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
|
|
||||||
@DsfServiceEventHandler
|
@DsfServiceEventHandler
|
||||||
public void handleEvent(IResumedDMEvent event) {
|
public void handleEvent(IResumedDMEvent event) {
|
||||||
|
if (fTargetContext == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final IExecutionDMContext context= event.getDMContext();
|
final IExecutionDMContext context= event.getDMContext();
|
||||||
if (context.equals(fTargetContext)
|
if (context.equals(fTargetContext)
|
||||||
|| DMContexts.isAncestorOf(fTargetContext, context)) {
|
|| DMContexts.isAncestorOf(fTargetContext, context)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue