Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Fix ThrowObjectDisposedException_MemoryDisposed arguments
Browse files Browse the repository at this point in the history
Manually propage change that was not mirrored correctly

Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
  • Loading branch information
jkotas committed Jan 23, 2018
1 parent 71545fb commit 3f03814
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Common/src/CoreLib/System/Buffers/OwnedMemory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public Memory<T> Memory
{
if (IsDisposed)
{
ThrowHelper.ThrowObjectDisposedException_MemoryDisposed(nameof(OwnedMemory<T>));
ThrowHelper.ThrowObjectDisposedException_MemoryDisposed();
}
return new Memory<T>(owner: this, 0, Length);
}
Expand Down
4 changes: 2 additions & 2 deletions src/System.Memory/src/System/ThrowHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ internal static class ThrowHelper
[MethodImpl(MethodImplOptions.NoInlining)]
private static Exception CreateInvalidOperationException_OutstandingReferences() { return new InvalidOperationException(SR.OutstandingReferences); }

internal static void ThrowObjectDisposedException_MemoryDisposed(string objectName) { throw CreateObjectDisposedException_MemoryDisposed(objectName); }
internal static void ThrowObjectDisposedException_MemoryDisposed() { throw CreateObjectDisposedException_MemoryDisposed(); }
[MethodImpl(MethodImplOptions.NoInlining)]
private static Exception CreateObjectDisposedException_MemoryDisposed(string objectName) { return new ObjectDisposedException(objectName, SR.MemoryDisposed); }
private static Exception CreateObjectDisposedException_MemoryDisposed() { return new ObjectDisposedException("OwnedMemory<T>", SR.MemoryDisposed); }

internal static void ThrowFormatException_BadFormatSpecifier() { throw CreateFormatException_BadFormatSpecifier(); }
[MethodImpl(MethodImplOptions.NoInlining)]
Expand Down

0 comments on commit 3f03814

Please sign in to comment.