diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-28 14:43:09 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2016-12-28 16:11:48 +0900 |
commit | f5c6d8a9014bbcf0026c33d4b374bb281d361182 (patch) | |
tree | 483edfc47b6028c53fc115da489f5dba3ce624c5 /src/mscorlib/src/System/Text/DecoderBestFitFallback.cs | |
parent | e4b937600de48a883039191030fb69b07c52b8c2 (diff) | |
parent | db20f3f1bb8595633a7e16c8900fd401a453a6b5 (diff) | |
download | coreclr-f5c6d8a9014bbcf0026c33d4b374bb281d361182.tar.gz coreclr-f5c6d8a9014bbcf0026c33d4b374bb281d361182.tar.bz2 coreclr-f5c6d8a9014bbcf0026c33d4b374bb281d361182.zip |
Merge branch 'upstream' into tizen
Change-Id: I4400c6fae623c356170074871ee575b96a4af206
Diffstat (limited to 'src/mscorlib/src/System/Text/DecoderBestFitFallback.cs')
-rw-r--r-- | src/mscorlib/src/System/Text/DecoderBestFitFallback.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mscorlib/src/System/Text/DecoderBestFitFallback.cs b/src/mscorlib/src/System/Text/DecoderBestFitFallback.cs index 5c1dcd9682..6389b4b141 100644 --- a/src/mscorlib/src/System/Text/DecoderBestFitFallback.cs +++ b/src/mscorlib/src/System/Text/DecoderBestFitFallback.cs @@ -10,6 +10,7 @@ namespace System.Text using System; using System.Text; using System.Threading; + using System.Diagnostics; using System.Diagnostics.Contracts; [Serializable] @@ -101,7 +102,7 @@ namespace System.Text public override bool Fallback(byte[] bytesUnknown, int index) { // We expect no previous fallback in our buffer - Contract.Assert(iCount < 1, "[DecoderReplacementFallbackBuffer.Fallback] Calling fallback without a previously empty buffer"); + Debug.Assert(iCount < 1, "[DecoderReplacementFallbackBuffer.Fallback] Calling fallback without a previously empty buffer"); cBestFit = TryBestFit(bytesUnknown); if (cBestFit == '\0') @@ -155,7 +156,6 @@ namespace System.Text } // Clear the buffer - [System.Security.SecuritySafeCritical] // overrides public transparent member public override unsafe void Reset() { iCount = -1; @@ -163,7 +163,6 @@ namespace System.Text } // This version just counts the fallback and doesn't actually copy anything. - [System.Security.SecurityCritical] // auto-generated internal unsafe override int InternalFallback(byte[] bytes, byte* pBytes) // Right now this has both bytes and bytes[], since we might have extra bytes, hence the // array, and we might need the index, hence the byte* @@ -212,7 +211,7 @@ namespace System.Text if (cTest == cCheck) { // We found it - Contract.Assert(index + 1 < oFallback.arrayBestFit.Length, + Debug.Assert(index + 1 < oFallback.arrayBestFit.Length, "[InternalDecoderBestFitFallbackBuffer.TryBestFit]Expected replacement character at end of array"); return oFallback.arrayBestFit[index + 1]; } @@ -233,7 +232,7 @@ namespace System.Text if (oFallback.arrayBestFit[index] == cCheck) { // We found it - Contract.Assert(index + 1 < oFallback.arrayBestFit.Length, + Debug.Assert(index + 1 < oFallback.arrayBestFit.Length, "[InternalDecoderBestFitFallbackBuffer.TryBestFit]Expected replacement character at end of array"); return oFallback.arrayBestFit[index + 1]; } |