[sgen] Don't reallocate mod_union at each major
[mono.git] / mcs / class / corlib / System / Exception.cs
index 7670ce338e693a9c88343b870db8fb51d178ac95..7b6b4923842067847bc9a421e96aae5ad1db0672 100644 (file)
@@ -69,6 +69,7 @@ namespace System
                IDictionary _data;
                internal StackTrace[] captured_traces;
                IntPtr[] native_trace_ips;
+               object dynamic_methods;
                #endregion
 #pragma warning restore 169, 649
 
@@ -199,26 +200,8 @@ namespace System
                                        /* Not thrown yet */
                                        return null;
 
-                               StringBuilder sb = new StringBuilder ();
-
-                               // Add traces captured using ExceptionDispatchInfo
-                               if (captured_traces != null) {
-                                       foreach (var t in captured_traces) {
-                                               if (!t.AddFrames (sb, true))
-                                                       continue;
-
-                                               sb.Append (Environment.NewLine);
-                                               sb.Append ("--- End of stack trace from previous location where exception was thrown ---");
-                                               sb.Append (Environment.NewLine);
-                                       }
-                               }
-
-                               StackTrace st = new StackTrace (this, 0, true, true);
-                               st.AddFrames (sb, true);
-
-                               stack_trace = sb.ToString ();
-
-                               return stack_trace;
+                               StackTrace st = new StackTrace (this, 0, true);
+                               return stack_trace = st.ToString ();
                        }
                }
 
@@ -265,7 +248,7 @@ namespace System
 
                        info.AddValue ("ClassName", ClassName);
                        info.AddValue ("Message", _message);
-                       info.AddValue ("InnerException", inner_exception);
+                       info.AddValue ("InnerException", inner_exception, typeof (Exception));
                        info.AddValue ("HelpURL", help_link);
                        info.AddValue ("StackTraceString", StackTrace);
                        info.AddValue ("RemoteStackTraceString", _remoteStackTraceString);
@@ -316,6 +299,7 @@ namespace System
                {
                        captured_traces = (StackTrace[]) exceptionDispatchInfo.BinaryStackTraceArray;
                        trace_ips = null;
+                       stack_trace = null;
                }
 
                //