فهرست منبع

2010-02-08 Zoltan Varga <[email protected]>

	* WaitHandle.cs (CheckArray): Check that the handles array is not null.
	Fixes #576039.

svn path=/trunk/mcs/; revision=151017
Zoltan Varga 16 سال پیش
والد
کامیت
00bdc8dcca
2فایلهای تغییر یافته به همراه13 افزوده شده و 0 حذف شده
  1. 5 0
      mcs/class/corlib/System.Threading/ChangeLog
  2. 8 0
      mcs/class/corlib/System.Threading/WaitHandle.cs

+ 5 - 0
mcs/class/corlib/System.Threading/ChangeLog

@@ -1,3 +1,8 @@
+2010-02-08  Zoltan Varga  <[email protected]>
+
+	* WaitHandle.cs (CheckArray): Check that the handles array is not null.
+	Fixes #576039.
+
 2010-02-02  Jérémie Laval  <[email protected]>
 
 	* CancellationToken.cs:

+ 8 - 0
mcs/class/corlib/System.Threading/WaitHandle.cs

@@ -54,6 +54,14 @@ namespace System.Threading
 			if (length > 64)
 				throw new NotSupportedException ("Too many handles");
 
+			if (handles.Length == 0) {
+				// MS throws different exceptions from the different methods.
+				if (waitAll)
+					throw new ArgumentNullException ("waitHandles");
+				else
+					throw new ArgumentException ();
+			}
+
 #if false
 			//
 			// Although we should thrown an exception if this is an STA thread,