Skip to content

Commit 8fea1e8

Browse files
committed
! Address potential threading issue
1 parent a170f5e commit 8fea1e8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Diff for: Codist/QuickInfo/QuickInfoOverride.cs

+1
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ void RemoveSymbolHighlight(object sender, MouseEventArgs e) {
203203
((TextBlock)sender).Background = Brushes.Transparent;
204204
}
205205

206+
[SuppressMessage("Usage", Suppression.VSTHRD100, Justification = Suppression.EventHandler)]
206207
void GoToSource(object sender, MouseButtonEventArgs e) {
207208
try {
208209
_symbol.GoToDefinition();

Diff for: Codist/Semantics/CodeAnalysisHelper.Symbol.cs

+1
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,7 @@ public static void GoToSource(this SyntaxReference loc) {
11381138
}
11391139

11401140
public static void GoToDefinition(this ISymbol symbol) {
1141+
Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread();
11411142
var r = symbol.GetSourceReferences();
11421143
if (r.Length == 1) {
11431144
r[0].GoToSource();

0 commit comments

Comments
 (0)