Remove Environment.StackTrace as crashing tests
This commit is contained in:
parent
aa385a1317
commit
f42316af7f
|
|
@ -82,7 +82,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
|
|||
#if DEBUG
|
||||
block.Leaser = memberName + ", " + sourceFilePath + ", " + sourceLineNumber;
|
||||
block.IsLeased = true;
|
||||
block.StackTrace = Environment.StackTrace;
|
||||
#endif
|
||||
return block;
|
||||
}
|
||||
|
|
@ -91,7 +90,6 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
|
|||
#if DEBUG
|
||||
block.Leaser = memberName + ", " + sourceFilePath + ", " + sourceLineNumber;
|
||||
block.IsLeased = true;
|
||||
block.StackTrace = Environment.StackTrace;
|
||||
#endif
|
||||
return block;
|
||||
}
|
||||
|
|
@ -148,7 +146,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
|
|||
{
|
||||
#if DEBUG
|
||||
Debug.Assert(block.Pool == this, "Returned block was not leased from this pool");
|
||||
Debug.Assert(block.IsLeased, $"Block being returned to pool twice: {block.Leaser}{Environment.NewLine}{block.StackTrace}");
|
||||
Debug.Assert(block.IsLeased, $"Block being returned to pool twice: {block.Leaser}{Environment.NewLine}");
|
||||
block.IsLeased = false;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -74,13 +74,12 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure
|
|||
#if DEBUG
|
||||
public bool IsLeased { get; set; }
|
||||
public string Leaser { get; set; }
|
||||
public string StackTrace { get; set; }
|
||||
#endif
|
||||
|
||||
~MemoryPoolBlock()
|
||||
{
|
||||
#if DEBUG
|
||||
Debug.Assert(Slab == null || !Slab.IsActive, $"{Environment.NewLine}{Environment.NewLine}*** Block being garbage collected instead of returned to pool: {Leaser} ***{Environment.NewLine}Allocation StackTrace:{Environment.NewLine}{StackTrace}");
|
||||
Debug.Assert(Slab == null || !Slab.IsActive, $"{Environment.NewLine}{Environment.NewLine}*** Block being garbage collected instead of returned to pool: {Leaser} ***{Environment.NewLine}");
|
||||
#endif
|
||||
if (Slab != null && Slab.IsActive)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue