mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-04 18:29:37 +02:00
GP-0: Trace recorder should only release trace once.
This commit is contained in:
parent
7f2675c9c1
commit
00b8e14f37
1 changed files with 8 additions and 5 deletions
|
@ -81,6 +81,7 @@ public class DefaultTraceRecorder implements TraceRecorder {
|
|||
|
||||
public DefaultTraceRecorder(DebuggerModelServicePlugin plugin, Trace trace, TargetObject target,
|
||||
DefaultDebuggerTargetTraceMapper mapper) {
|
||||
trace.addConsumer(this);
|
||||
this.plugin = plugin;
|
||||
this.tool = plugin.getTool();
|
||||
this.trace = trace;
|
||||
|
@ -99,9 +100,6 @@ public class DefaultTraceRecorder implements TraceRecorder {
|
|||
this.symbolRecorder = new DefaultSymbolRecorder(this);
|
||||
this.timeRecorder = new DefaultTimeRecorder(this);
|
||||
this.objectManager = new TraceObjectManager(target, mapper, this);
|
||||
|
||||
trace.addConsumer(this);
|
||||
|
||||
}
|
||||
|
||||
/*---------------- OBJECT MANAGER METHODS -------------------*/
|
||||
|
@ -358,10 +356,15 @@ public class DefaultTraceRecorder implements TraceRecorder {
|
|||
}
|
||||
|
||||
protected void invalidate() {
|
||||
valid = false;
|
||||
objectManager.disposeModelListeners();
|
||||
synchronized (this) {
|
||||
if (!valid) {
|
||||
return;
|
||||
}
|
||||
valid = false;
|
||||
trace.release(this);
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------- FOCUS-SUPPORT METHODS -------------------*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue