mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 330289: [variables] Race condition when updating a variable object
This commit is contained in:
parent
1ca8db05d7
commit
6ae45784a5
1 changed files with 6 additions and 2 deletions
|
@ -2014,14 +2014,14 @@ public class MIVariableManager implements ICommandControl {
|
||||||
new DataRequestMonitor<MIVarUpdateInfo>(fSession.getExecutor(), rm) {
|
new DataRequestMonitor<MIVarUpdateInfo>(fSession.getExecutor(), rm) {
|
||||||
@Override
|
@Override
|
||||||
protected void handleCompleted() {
|
protected void handleCompleted() {
|
||||||
currentState = STATE_READY;
|
|
||||||
|
|
||||||
if (isSuccess()) {
|
if (isSuccess()) {
|
||||||
setOutOfDate(false);
|
setOutOfDate(false);
|
||||||
|
|
||||||
MIVarChange[] changes = getData().getMIVarChanges();
|
MIVarChange[] changes = getData().getMIVarChanges();
|
||||||
if (changes.length > 0 && changes[0].isInScope() == false) {
|
if (changes.length > 0 && changes[0].isInScope() == false) {
|
||||||
// Object is out-of-scope
|
// Object is out-of-scope
|
||||||
|
currentState = STATE_READY;
|
||||||
|
|
||||||
outOfScope = true;
|
outOfScope = true;
|
||||||
|
|
||||||
// We can delete this root in GDB right away. This is safe, even
|
// We can delete this root in GDB right away. This is safe, even
|
||||||
|
@ -2046,6 +2046,8 @@ public class MIVariableManager implements ICommandControl {
|
||||||
processChanges(changes, new RequestMonitor(fSession.getExecutor(), rm) {
|
processChanges(changes, new RequestMonitor(fSession.getExecutor(), rm) {
|
||||||
@Override
|
@Override
|
||||||
protected void handleCompleted() {
|
protected void handleCompleted() {
|
||||||
|
currentState = STATE_READY;
|
||||||
|
|
||||||
// We only mark this root as updated in our list if it is in-scope.
|
// We only mark this root as updated in our list if it is in-scope.
|
||||||
// For out-of-scope object, we don't ever need to re-update them so
|
// For out-of-scope object, we don't ever need to re-update them so
|
||||||
// we don't need to add them to this list.
|
// we don't need to add them to this list.
|
||||||
|
@ -2072,6 +2074,8 @@ public class MIVariableManager implements ICommandControl {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// We were not able to update for some reason
|
// We were not able to update for some reason
|
||||||
|
currentState = STATE_READY;
|
||||||
|
|
||||||
rm.setData(false);
|
rm.setData(false);
|
||||||
rm.done();
|
rm.done();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue