Skip to content

Commit f6338d7

Browse files
author
David Karlaš
authored
Merge pull request #1782 from JetBrains/corDebugActiveChainOptimization
A little optimization: caching of ActiveChain property
2 parents 9be63ec + 3d842ba commit f6338d7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Mono.Debugging.Win32/CorEvaluationContext.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public class CorEvaluationContext: EvaluationContext
99
{
1010
CorEval corEval;
1111
CorFrame frame;
12+
CorChain activeChain;
1213
int frameIndex;
1314
int evalTimestamp;
1415
readonly CorBacktrace backtrace;
@@ -37,6 +38,7 @@ void CheckTimestamp ( )
3738
thread = null;
3839
frame = null;
3940
corEval = null;
41+
activeChain = null;
4042
}
4143
}
4244

@@ -53,6 +55,16 @@ public CorThread Thread {
5355
}
5456
}
5557

58+
public CorChain ActiveChain {
59+
get {
60+
CheckTimestamp ();
61+
if (activeChain == null) {
62+
activeChain = Thread.ActiveChain;
63+
}
64+
return activeChain;
65+
}
66+
}
67+
5668
public CorFrame Frame {
5769
get {
5870
CheckTimestamp ();

0 commit comments

Comments
 (0)