[aot] Disable COM support in AOT code, the COM wrapper code doesn't play well with...
authorZoltan Varga <vargaz@gmail.com>
Mon, 17 Nov 2014 22:42:28 +0000 (17:42 -0500)
committerZoltan Varga <vargaz@gmail.com>
Mon, 17 Nov 2014 22:42:35 +0000 (17:42 -0500)
mono/metadata/marshal.c

index 3fb7b1d2b445a26e6c454252fda8d44691ed3150..5ee8be3031a7f7eee68c2ce152d8cfb4a81175b4 100644 (file)
@@ -8955,11 +8955,12 @@ mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions,
                return res;
 
        if (MONO_CLASS_IS_IMPORT (method->klass)) {
+               /* The COM code is not AOT compatible, it calls mono_custom_attrs_get_attr_checked () */
+               if (aot)
+                       return method;
 #ifndef DISABLE_COM
                return mono_cominterop_get_native_wrapper (method);
 #else
-               if (aot)
-                       return method;
                g_assert_not_reached ();
 #endif
        }