Expose a member of StrongNameKeyPair, fix bug in SynchronizationContext (#8142)
authorKoundinya Veluri <kouvel@microsoft.com>
Wed, 16 Nov 2016 20:55:53 +0000 (12:55 -0800)
committerGitHub <noreply@github.com>
Wed, 16 Nov 2016 20:55:53 +0000 (12:55 -0800)
Related to dotnet/corefx#11636
Related to dotnet/corefx#11808

src/mscorlib/model.xml
src/mscorlib/src/System/Reflection/StrongNameKeyPair.cs
src/mscorlib/src/System/Threading/SynchronizationContext.cs
src/vm/ecalllist.h

index c47940e1f78a96b828986a7022b67347db0850eb..0ca64124618c98dde086726973faf0e4c17e5431 100644 (file)
     </Type>
     <Type Name="System.Reflection.StrongNameKeyPair">
       <Member Name="#ctor(System.Byte[])" />
-      <!--      <Member Name="#ctor(System.IO.FileStream)" /> -->
+      <Member Name="#ctor(System.IO.FileStream)" />
       <Member Name="#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
       <Member Name="#ctor(System.String)" />
       <Member Name="get_PublicKey" />
index f9fbb631e1b9bde318164256402d6ddd5b74b5b0..1a38fafe8c7acf79fe76a3fdda6a344ac3a0c14b 100644 (file)
@@ -39,7 +39,6 @@ namespace System.Reflection
         private String  _keyPairContainer;
         private byte[]  _publicKey;
 
-#if !FEATURE_CORECLR
         // Build key pair from file.
         [System.Security.SecuritySafeCritical]  // auto-generated
 #pragma warning disable 618
@@ -57,7 +56,6 @@ namespace System.Reflection
 
             _keyPairExported = true;
         }
-#endif// FEATURE_CORECLR
 
         // Build key pair from byte array in memory.
         [System.Security.SecuritySafeCritical]  // auto-generated
index 2f2dc3608779f83c5ee38e9e9fba6effea897be6..a9422c15a93152b9e0fd5e1a30778c733d5035c8 100644 (file)
@@ -143,28 +143,39 @@ namespace System.Threading
         }
 
 #if FEATURE_SYNCHRONIZATIONCONTEXT_WAIT
-        // Method called when the CLR does a wait operation 
+        // Method called when the CLR does a wait operation
         [System.Security.SecurityCritical]  // auto-generated_required
         [CLSCompliant(false)]
         [PrePrepareMethod]
         public virtual int Wait(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)
+        {
+            return WaitHelper(waitHandles, waitAll, millisecondsTimeout);
+        }
+
+        // Method that can be called by Wait overrides
+        [System.Security.SecurityCritical]  // auto-generated_required
+        [CLSCompliant(false)]
+        [PrePrepareMethod]
+        [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
+        protected static int WaitHelper(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)
         {
             if (waitHandles == null)
             {
                 throw new ArgumentNullException(nameof(waitHandles));
             }
             Contract.EndContractBlock();
-            return WaitHelper(waitHandles, waitAll, millisecondsTimeout);
+
+            return WaitHelperNative(waitHandles, waitAll, millisecondsTimeout);
         }
-                                
-        // Static helper to which the above method can delegate to in order to get the default 
+
+        // Static helper to which the above method can delegate to in order to get the default
         // COM behavior.
         [System.Security.SecurityCritical]  // auto-generated_required
         [CLSCompliant(false)]
         [PrePrepareMethod]
-        [MethodImplAttribute(MethodImplOptions.InternalCall)]       
+        [MethodImplAttribute(MethodImplOptions.InternalCall)]
         [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
-        protected static extern int WaitHelper(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout);
+        private static extern int WaitHelperNative(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout);
 #endif
 
 #if FEATURE_CORECLR
index 331bfe66cc13c9a652adf0591823a56acfe55900..d5063c45f961d7de03df9ea229258214d48594e5 100644 (file)
@@ -1860,7 +1860,7 @@ FCFuncEnd()
 
 FCFuncStart(gContextSynchronizationFuncs)
 #ifdef FEATURE_SYNCHRONIZATIONCONTEXT_WAIT
-    FCFuncElement("WaitHelper", SynchronizationContextNative::WaitHelper)
+    FCFuncElement("WaitHelperNative", SynchronizationContextNative::WaitHelper)
 #endif // #ifdef FEATURE_SYNCHRONIZATIONCONTEXT_WAIT
 #ifdef FEATURE_APPX
     QCFuncElement("GetWinRTDispatcherForCurrentThread", SynchronizationContextNative::GetWinRTDispatcherForCurrentThread)