diff options
Diffstat (limited to 'src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs')
-rw-r--r-- | src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs b/src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs index c2911d9a21..7544a0bf3b 100644 --- a/src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs +++ b/src/mscorlib/src/System/Runtime/Serialization/FormatterServices.cs @@ -35,10 +35,8 @@ namespace System.Runtime.Serialization { public static class FormatterServices { #if FEATURE_SERIALIZATION internal static Dictionary<MemberHolder, MemberInfo[]> m_MemberInfoTable = new Dictionary<MemberHolder, MemberInfo[]>(32); - [System.Security.SecurityCritical] private static bool unsafeTypeForwardersIsEnabled = false; - [System.Security.SecurityCritical] private static volatile bool unsafeTypeForwardersIsEnabledInitialized = false; private static Object s_FormatterServicesSyncObject = null; @@ -56,7 +54,6 @@ namespace System.Runtime.Serialization { } } - [SecuritySafeCritical] static FormatterServices() { // Static initialization touches security critical types, so we need an @@ -186,7 +183,6 @@ namespace System.Runtime.Serialization { // be included, properties must have both a getter and a setter. N.B.: A class // which implements ISerializable or has a serialization surrogate may not use all of these members // (or may have additional members). - [System.Security.SecurityCritical] // auto-generated_required public static MemberInfo[] GetSerializableMembers(Type type) { return GetSerializableMembers(type, new StreamingContext(StreamingContextStates.All)); } @@ -194,7 +190,6 @@ namespace System.Runtime.Serialization { // Get all of the Serializable Members for a particular class. If we're not cloning, this is all // non-transient, non-static fields. If we are cloning, include the transient fields as well since // we know that we're going to live inside of the same context. - [System.Security.SecurityCritical] // auto-generated_required public static MemberInfo[] GetSerializableMembers(Type type, StreamingContext context) { MemberInfo[] members; @@ -249,7 +244,6 @@ namespace System.Runtime.Serialization { // will not create an unitialized string because it is non-sensical to create an empty // instance of an immutable type. // - [System.Security.SecurityCritical] // auto-generated_required public static Object GetUninitializedObject(Type type) { if ((object)type == null) { throw new ArgumentNullException(nameof(type)); @@ -263,7 +257,6 @@ namespace System.Runtime.Serialization { return nativeGetUninitializedObject((RuntimeType)type); } - [System.Security.SecurityCritical] // auto-generated_required public static Object GetSafeUninitializedObject(Type type) { if ((object)type == null) { throw new ArgumentNullException(nameof(type)); @@ -282,19 +275,15 @@ namespace System.Runtime.Serialization { } } - [System.Security.SecurityCritical] // auto-generated [MethodImplAttribute(MethodImplOptions.InternalCall)] private static extern Object nativeGetSafeUninitializedObject(RuntimeType type); - [System.Security.SecurityCritical] // auto-generated [MethodImplAttribute(MethodImplOptions.InternalCall)] private static extern Object nativeGetUninitializedObject(RuntimeType type); #if FEATURE_SERIALIZATION - [System.Security.SecurityCritical] [MethodImplAttribute(MethodImplOptions.InternalCall)] private static extern bool GetEnableUnsafeTypeForwarders(); - [SecuritySafeCritical] internal static bool UnsafeTypeForwardersIsEnabled() { if (!unsafeTypeForwardersIsEnabledInitialized) @@ -307,7 +296,6 @@ namespace System.Runtime.Serialization { } #endif private static Binder s_binder = Type.DefaultBinder; - [System.Security.SecurityCritical] internal static void SerializationSetValue(MemberInfo fi, Object target, Object value) { Contract.Requires(fi != null); @@ -334,7 +322,6 @@ namespace System.Runtime.Serialization { // Fill in the members of obj with the data contained in data. // Returns the number of members populated. // - [System.Security.SecurityCritical] // auto-generated_required public static Object PopulateObjectMembers(Object obj, MemberInfo[] members, Object[] data) { if (obj==null) { throw new ArgumentNullException(nameof(obj)); @@ -389,7 +376,6 @@ namespace System.Runtime.Serialization { // extract (must be FieldInfos or PropertyInfos). For each supplied member, extract the matching value and // return it in a Object[] of the same size. // - [System.Security.SecurityCritical] // auto-generated_required public static Object[] GetObjectData(Object obj, MemberInfo[] members) { if (obj==null) { @@ -432,7 +418,6 @@ namespace System.Runtime.Serialization { return data; } - [System.Security.SecurityCritical] // auto-generated_required [System.Runtime.InteropServices.ComVisible(false)] public static ISerializationSurrogate GetSurrogateForCyclicalReference(ISerializationSurrogate innerSurrogate) { @@ -448,7 +433,6 @@ namespace System.Runtime.Serialization { **Arguments: **Exceptions: ==============================================================================*/ - [System.Security.SecurityCritical] // auto-generated_required public static Type GetTypeFromAssembly(Assembly assem, String name) { if (assem==null) throw new ArgumentNullException(nameof(assem)); @@ -559,13 +543,11 @@ namespace System.Runtime.Serialization { this.innerSurrogate = innerSurrogate; } - [System.Security.SecurityCritical] // auto-generated public void GetObjectData(Object obj, SerializationInfo info, StreamingContext context) { innerSurrogate.GetObjectData(obj, info, context); } - [System.Security.SecurityCritical] // auto-generated public Object SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) { return innerSurrogate.SetObjectData(obj, info, context, selector); |