Revert "Set `vtable->init_aborted' if we hit a `ThreadAbortException' in the class...
authorMartin Baulig <martin@novell.com>
Thu, 4 Mar 2010 17:13:36 +0000 (17:13 -0000)
committerMartin Baulig <martin@novell.com>
Thu, 4 Mar 2010 17:13:36 +0000 (17:13 -0000)
This reverts commit afb31f21610177e68c3bc4b36c2b86f1a27501d7.

svn path=/trunk/mono/; revision=153033

mono/metadata/ChangeLog
mono/metadata/class-internals.h
mono/metadata/object.c

index 626bcd043d2fd18f83d2546d040fda62b88c9adc..5a0bf645dddca754ffb1c7bce129406899309e73 100644 (file)
@@ -124,16 +124,6 @@ Fri Feb 26 19:23:18 CET 2010 Paolo Molaro <lupus@ximian.com>
 
        * class.c: reduce size of ridiculously large cache.
 
-2010-02-26  Martin Baulig  <martin@ximian.com>
-
-       * class-internals.h (MonoVTable): Added `init_aborted'.
-
-       * object.c
-       (mono_runtime_class_init_full): Set `vtable->init_aborted' in
-       addition to `vtable->init_failed' if we hit a `ThreadAbortException'
-       while running the class .cctor and reset `init_failed' next time
-       we're called.
-
 2010-02-26  Martin Baulig  <martin@ximian.com>
 
        * mono-debug.h
index c041e85282b82f55c9d7bc5621d40d6af5e89575..43bebb2eac10ae345b1b79f505c49529d15fdcbc 100644 (file)
@@ -439,7 +439,6 @@ struct MonoVTable {
        guint remote          : 1; /* class is remotely activated */
        guint initialized     : 1; /* cctor has been run */
        guint init_failed     : 1; /* cctor execution failed */
-       guint init_aborted    : 1; /* cctor execution aborted */
        guint32     imt_collisions_bitmap;
        MonoRuntimeGenericContext *runtime_generic_context;
        /* do not add any fields after vtable, the structure is dynamically extended */
index 8fcac91bf3fc9fb7126ba4a490ce8faca0dc0867..fa9dc852697909972fe870c4f64ecc2aa838c778 100644 (file)
@@ -285,17 +285,6 @@ mono_runtime_class_init_full (MonoVTable *vtable, gboolean raise_exception)
                        mono_type_initialization_unlock ();
                        return NULL;
                }
-               if (vtable->init_aborted) {
-                       /*
-                        * The current thread was aborting while running the .cctor the last time,
-                        * so let's try again.
-                        *
-                        * The Mono Debugger calls Thread.Abort() on the current thread to abort a
-                        * method call (after an expression evaluation timeout, for instance).
-                        */
-                       vtable->init_aborted = 0;
-                       vtable->init_failed = 0;
-               }
                if (vtable->init_failed) {
                        mono_type_initialization_unlock ();
 
@@ -375,20 +364,6 @@ mono_runtime_class_init_full (MonoVTable *vtable, gboolean raise_exception)
                                exc_to_throw = mono_get_exception_type_initialization (full_name, exc);
                                g_free (full_name);
 
-                               if (exc) {
-                                       MonoClass *exc_klass = exc->object.vtable->klass;
-
-                                       if (exc_klass->image == mono_defaults.corlib &&
-                                           !strcmp (exc_klass->name_space, "System.Threading") &&
-                                           !strcmp (exc_klass->name, "ThreadAbortException")) {
-                                               /*
-                                                * Set `init_aborted' in addition to `init_failed' if the
-                                                * current thread was aborted while running the .cctor.
-                                                */
-                                               vtable->init_aborted = 1;
-                                       }
-                               }
-
                                /* 
                                 * Store the exception object so it could be thrown on subsequent 
                                 * accesses.