未验证 提交 d94125f0 编写于 作者: M msftbot[bot] 提交者: GitHub

Merge pull request #47339 from CyrusNajmabadi/noCrash

Do not crash later on if we are unable to roundtrip a symbol to OOP.
......@@ -75,7 +75,15 @@ public async Task OnDefinitionFoundAsync(SerializableSymbolAndProjectId definiti
ISymbol symbol;
lock (_gate)
{
symbol = _definitionMap[definition];
// The definition may not be in the map if we failed to map it over using TryRehydrateAsync in OnDefinitionFoundAsync.
// Just ignore this reference. Note: while this is a degraded experience:
//
// 1. TryRehydrateAsync logs an NFE so we can track down while we're failing to roundtrip the
// definition so we can track down that issue.
// 2. NFE'ing and failing to show a result, is much better than NFE'ing and then crashing
// immediately afterwards.
if (!_definitionMap.TryGetValue(definition, out symbol))
return;
}
var referenceLocation = await reference.RehydrateAsync(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册