Author: miguel
Date: 2007-09-25 17:43:56 -0400 (Tue, 25 Sep 2007)
New Revision: 86360
Modified:
trunk/mcs/class/System/System.Diagnostics/ChangeLog
trunk/mcs/class/System/System.Diagnostics/Process.cs
trunk/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs
Log:
2007-09-25 Miguel de Icaza <[EMAIL PROTECTED]>
* Process.cs: Return an empty collection to prevent crashes;
Fixes #319946
Modified: trunk/mcs/class/System/System.Diagnostics/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/ChangeLog 2007-09-25 21:42:29 UTC
(rev 86359)
+++ trunk/mcs/class/System/System.Diagnostics/ChangeLog 2007-09-25 21:43:56 UTC
(rev 86360)
@@ -1,4 +1,8 @@
+2007-09-25 Miguel de Icaza <[EMAIL PROTECTED]>
+ * Process.cs: Return an empty collection to prevent crashes;
+ Fixes #319946
+
Tue Sep 25 18:03:37 CEST 2007 Paolo Molaro <[EMAIL PROTECTED]>
* Process.cs: eliminate the console encoding logic which was
Modified: trunk/mcs/class/System/System.Diagnostics/Process.cs
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/Process.cs 2007-09-25
21:42:29 UTC (rev 86359)
+++ trunk/mcs/class/System/System.Diagnostics/Process.cs 2007-09-25
21:43:56 UTC (rev 86360)
@@ -690,7 +690,7 @@
[MonitoringDescription ("The number of threads of this
process.")]
public ProcessThreadCollection Threads {
get {
- return(null);
+ return ProcessThreadCollection.GetEmpty ();
}
}
Modified: trunk/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs
===================================================================
--- trunk/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs
2007-09-25 21:42:29 UTC (rev 86359)
+++ trunk/mcs/class/System/System.Diagnostics/ProcessThreadCollection.cs
2007-09-25 21:43:56 UTC (rev 86360)
@@ -59,6 +59,11 @@
{
}
+ internal static ProcessThreadCollection GetEmpty ()
+ {
+ return new ProcessThreadCollection ();
+ }
+
public ProcessThreadCollection(ProcessThread[] processThreads)
{
InnerList.AddRange (processThreads);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches