未验证 提交 cc5b6648 编写于 作者: I Ivan Basov 提交者: GitHub

EnC does not work in .NET Core async methods (#26210)

上级 b79c5a5c
......@@ -1174,7 +1174,9 @@ private StandaloneSignatureHandle GetBaselineLocalSignature(MethodDefinitionHand
Debug.Assert(Thread.CurrentThread.GetApartmentState() == ApartmentState.MTA);
var symMethod = (ISymUnmanagedMethod2)_pdbReader.Value.GetMethodByVersion(MetadataTokens.GetToken(methodHandle), methodVersion: 1);
return MetadataTokens.StandaloneSignatureHandle(symMethod.GetLocalSignatureToken());
// Compiler generated methods (e.g. async kick-off methods) might not have debug information.
return symMethod == null ? default : MetadataTokens.StandaloneSignatureHandle(symMethod.GetLocalSignatureToken());
}
/// <summary>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册