Imported Upstream version 6.12.0.86

Former-commit-id: 7a84ce7d08c42c458ac8e74b27186ca863315d79
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-07-10 08:44:59 +00:00
parent 92747312ea
commit 0b380204a4
812 changed files with 26901 additions and 9053 deletions

View File

@@ -186,7 +186,11 @@ namespace System
{
try {
// TODO: Should use __ConsoleStream from reference sources
return new FileStream (handle, access, false, bufferSize, false, true);
var stream = new FileStream (handle, access, false, bufferSize, false, true);
// Don't run the finalizer on the underlying stream so that System.WriteLine can be
// called inside a finalizer during shutdown or domain unload.
GC.SuppressFinalize (stream);
return stream;
} catch (IOException) {
return Stream.Null;
}

View File

@@ -67,7 +67,7 @@ namespace System
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal static extern object[] GetCustomAttributesInternal (ICustomAttributeProvider obj, Type attributeType, bool pseudoAttrs);
internal static extern Attribute[] GetCustomAttributesInternal (ICustomAttributeProvider obj, Type attributeType, bool pseudoAttrs);
internal static object[] GetPseudoCustomAttributes (ICustomAttributeProvider obj, Type attributeType) {
object[] pseudoAttrs = null;
@@ -134,7 +134,7 @@ namespace System
if (!inheritedOnly) {
object[] pseudoAttrs = GetPseudoCustomAttributes (obj, attributeType);
if (pseudoAttrs != null) {
object[] res = new object [attrs.Length + pseudoAttrs.Length];
object[] res = new Attribute [attrs.Length + pseudoAttrs.Length];
System.Array.Copy (attrs, res, attrs.Length);
System.Array.Copy (pseudoAttrs, 0, res, attrs.Length, pseudoAttrs.Length);
return res;