* java/lang/natThrowable.cc (fillInStackTrace): Do nothing if
trace_enabled not set.
* prims.cc (main_init): Turn off trace_enabled while creating
default exception objects.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38442
138bc75d-0d04-0410-961f-
82ee72b054a4
+2000-12-22 Bryce McKinlay <bryce@albatross.co.nz>
+
+ * java/lang/Throwable.java (trace_enabled): New static field.
+ * java/lang/natThrowable.cc (fillInStackTrace): Do nothing if
+ trace_enabled not set.
+ * prims.cc (main_init): Turn off trace_enabled while creating
+ default exception objects.
+
2000-12-21 Tom Tromey <tromey@redhat.com>
* java/beans/PropertyChangeListener.java: Extends EventListener.
// Name of this field comes from serialization spec.
private String detailMessage;
+ // Setting this flag to false prevents fillInStackTrace() from running.
+ static boolean trace_enabled = true;
private transient byte stackTrace[];
private static final long serialVersionUID = -3042686055658047285L;
}
java::lang::Throwable *
java::lang::Throwable::fillInStackTrace (void)
{
+ if (! trace_enabled)
+ return this;
#if defined (HAVE_BACKTRACE) || defined (__ia64__)
void *p[128];
static void
main_init ()
{
+ // Turn stack trace generation off while creating exception objects.
+ _Jv_InitClass (&java::lang::Throwable::class$);
+ java::lang::Throwable::trace_enabled = 0;
+
INIT_SEGV;
#ifdef HANDLE_FPE
INIT_FPE;
no_memory = new java::lang::OutOfMemoryError;
+ java::lang::Throwable::trace_enabled = 1;
+
#ifdef USE_LTDL
LTDL_SET_PRELOADED_SYMBOLS ();
#endif