[runtime] Don't raise exception while holding locks
authorAleksey Kliger <aleksey@xamarin.com>
Mon, 29 Feb 2016 16:51:41 +0000 (11:51 -0500)
committerAleksey Kliger <aleksey@xamarin.com>
Mon, 29 Feb 2016 16:51:41 +0000 (11:51 -0500)
mono/metadata/object.c

index c93cafee4af3432f01fdcc434f0514402b58cab0..63c28fd3b1112879e9f26dfc699f19590e0a413c 100644 (file)
@@ -2161,7 +2161,11 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
                        cm = klass->vtable [i];
                        if (cm) {
                                vt->vtable [i] = callbacks.create_jit_trampoline (domain, cm, error);
-                               mono_error_raise_exception (error); /* FIXME: Don't raise here */
+                               if (!is_ok (error)) {
+                                       mono_domain_unlock (domain);
+                                       mono_loader_unlock ();
+                                       return NULL;
+                               }
                        }
                }
        }