You've already forked linux-packaging-mono
Imported Upstream version 4.2.0.179
Former-commit-id: 4610231f55806d2a05ed69e5ff3faa7336cc1479
This commit is contained in:
committed by
Jo Shields
parent
aa7da660d6
commit
c042cd0c52
@@ -118,9 +118,11 @@ namespace System.Runtime.Serialization.Json
|
||||
|
||||
[Fx.Tag.SecurityNote(Critical = "Holds all state used for (de)serializing types."
|
||||
+ "Since the data is cached statically, we lock down access to it.")]
|
||||
#if !NO_SECURITY_ATTRIBUTES
|
||||
#pragma warning disable 618 // have not moved to the v4 security model yet
|
||||
[SecurityCritical(SecurityCriticalScope.Everything)]
|
||||
#pragma warning restore 618
|
||||
#endif
|
||||
class JsonClassDataContractCriticalHelper : JsonDataContractCriticalHelper
|
||||
{
|
||||
JsonFormatClassReaderDelegate jsonFormatReaderDelegate;
|
||||
|
@@ -141,9 +141,11 @@ namespace System.Runtime.Serialization.Json
|
||||
|
||||
[Fx.Tag.SecurityNote(Critical = "Holds all state used for (de)serializing types."
|
||||
+ "Since the data is cached statically, we lock down access to it.")]
|
||||
#if !NO_SECURITY_ATTRIBUTES
|
||||
#pragma warning disable 618 // have not moved to the v4 security model yet
|
||||
[SecurityCritical(SecurityCriticalScope.Everything)]
|
||||
#pragma warning restore 618
|
||||
#endif
|
||||
class JsonCollectionDataContractCriticalHelper : JsonDataContractCriticalHelper
|
||||
{
|
||||
JsonFormatCollectionReaderDelegate jsonFormatReaderDelegate;
|
||||
|
@@ -138,9 +138,11 @@ namespace System.Runtime.Serialization.Json
|
||||
|
||||
[Fx.Tag.SecurityNote(Critical = "Holds all state used for (de)serializing types."
|
||||
+ "Since the data is cached statically, we lock down access to it.")]
|
||||
#if !NO_SECURITY_ATTRIBUTES
|
||||
#pragma warning disable 618 // have not moved to the v4 security model yet
|
||||
[SecurityCritical(SecurityCriticalScope.Everything)]
|
||||
#pragma warning restore 618
|
||||
#endif
|
||||
#if USE_REFEMIT
|
||||
public class JsonDataContractCriticalHelper
|
||||
#else
|
||||
|
@@ -64,9 +64,11 @@ namespace System.Runtime.Serialization.Json
|
||||
|
||||
[Fx.Tag.SecurityNote(Critical = "Holds all state used for (de)serializing types."
|
||||
+ "Since the data is cached statically, we lock down access to it.")]
|
||||
#if !NO_SECURITY_ATTRIBUTES
|
||||
#pragma warning disable 618 // have not moved to the v4 security model yet
|
||||
[SecurityCritical(SecurityCriticalScope.Everything)]
|
||||
#pragma warning restore 618
|
||||
#endif
|
||||
class JsonEnumDataContractCriticalHelper : JsonDataContractCriticalHelper
|
||||
{
|
||||
bool isULong;
|
||||
|
@@ -6,7 +6,9 @@ namespace System.Runtime.Serialization.Json
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
#if !NO_DYNAMIC_CODEGEN
|
||||
using System.Reflection.Emit;
|
||||
#endif
|
||||
using System.Runtime;
|
||||
using System.Runtime.Serialization.Diagnostics.Application;
|
||||
using System.Security;
|
||||
@@ -17,7 +19,7 @@ namespace System.Runtime.Serialization.Json
|
||||
delegate object JsonFormatCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContextComplexJson context, XmlDictionaryString emptyDictionaryString, XmlDictionaryString itemName, CollectionDataContract collectionContract);
|
||||
delegate void JsonFormatGetOnlyCollectionReaderDelegate(XmlReaderDelegator xmlReader, XmlObjectSerializerReadContextComplexJson context, XmlDictionaryString emptyDictionaryString, XmlDictionaryString itemName, CollectionDataContract collectionContract);
|
||||
|
||||
sealed class JsonFormatReaderGenerator
|
||||
sealed partial class JsonFormatReaderGenerator
|
||||
{
|
||||
[Fx.Tag.SecurityNote(Critical = "Holds instance of CriticalHelper which keeps state that was produced within an assert.")]
|
||||
[SecurityCritical]
|
||||
@@ -102,10 +104,11 @@ namespace System.Runtime.Serialization.Json
|
||||
}
|
||||
}
|
||||
|
||||
#if !NO_DYNAMIC_CODEGEN
|
||||
[Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - handles all aspects of IL generation including initializing the DynamicMethod."
|
||||
+ "Changes to how IL generated could affect how data is deserialized and what gets access to data, "
|
||||
+ "therefore we mark it for review so that changes to generation logic are reviewed.")]
|
||||
class CriticalHelper
|
||||
partial class CriticalHelper
|
||||
{
|
||||
CodeGenerator ilg;
|
||||
LocalBuilder objectLocal;
|
||||
@@ -1106,6 +1109,7 @@ namespace System.Runtime.Serialization.Json
|
||||
UsingCustomParse
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -4,7 +4,9 @@ namespace System.Runtime.Serialization.Json
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Reflection;
|
||||
#if !NO_DYNAMIC_CODEGEN
|
||||
using System.Reflection.Emit;
|
||||
#endif
|
||||
using System.Runtime.Serialization.Diagnostics.Application;
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
@@ -13,7 +15,7 @@ namespace System.Runtime.Serialization.Json
|
||||
delegate void JsonFormatClassWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContextComplexJson context, ClassDataContract dataContract, XmlDictionaryString[] memberNames);
|
||||
delegate void JsonFormatCollectionWriterDelegate(XmlWriterDelegator xmlWriter, object obj, XmlObjectSerializerWriteContextComplexJson context, CollectionDataContract dataContract);
|
||||
|
||||
class JsonFormatWriterGenerator
|
||||
partial class JsonFormatWriterGenerator
|
||||
{
|
||||
[Fx.Tag.SecurityNote(Critical = "Holds instance of CriticalHelper which keeps state that was produced within an assert.")]
|
||||
[SecurityCritical]
|
||||
@@ -70,10 +72,11 @@ namespace System.Runtime.Serialization.Json
|
||||
}
|
||||
}
|
||||
|
||||
#if !NO_DYNAMIC_CODEGEN
|
||||
[Fx.Tag.SecurityNote(Miscellaneous = "RequiresReview - handles all aspects of IL generation including initializing the DynamicMethod."
|
||||
+ "Changes to how IL generated could affect how data is deserialized and what gets access to data, "
|
||||
+ "therefore we mark it for review so that changes to generation logic are reviewed.")]
|
||||
class CriticalHelper
|
||||
partial class CriticalHelper
|
||||
{
|
||||
CodeGenerator ilg;
|
||||
ArgBuilder xmlWriterArg;
|
||||
@@ -800,5 +803,6 @@ namespace System.Runtime.Serialization.Json
|
||||
ilg.Call(xmlWriterArg, JsonFormatGeneratorStatics.WriteEndElementMethod);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user