Make StackTrace Symbol Caching Aware of Collectible Types (Phase 2) (dotnet/corefx...
authorJohn Salem <josalem@microsoft.com>
Thu, 14 Mar 2019 17:02:53 +0000 (10:02 -0700)
committerGitHub <noreply@github.com>
Thu, 14 Mar 2019 17:02:53 +0000 (10:02 -0700)
commit5430468056af2793dfab480e25bd7416910e8cd3
tree23b17756737084a6084807ec5336ac95d2d45d04
parentd22cebd4423521dcc6411ce588c6b945d5d2a047
Make StackTrace Symbol Caching Aware of Collectible Types (Phase 2) (dotnet/corefx#35827)

* Update GetSourceLineInfo to consume an assembly:
* Use Assembly as cache key for MetadataReader
* Dynamic and regular assemblies now have the same cache key
* Prevents stale cache entries in the case where a PEFile is unloaded
and replaced by a new one in the same location

dotnet/coreclrdotnet/corefx#20179

* Remove redundant overload of GetSourceLineInfo
* update comments to reflect new behavior

* Change TryGetReader to use ConditionalWeakTable's atomic Add with callback method.
* cleaning up var names based on feedback

Commit migrated from https://github.com/dotnet/corefx/commit/6f00e97f85650768f87743df769206bfc4119fbc
src/libraries/System.Diagnostics.StackTrace/src/System/Diagnostics/StackTraceSymbols.CoreCLR.cs