Merge pull request #5560 from kumpera/wasm-work-p3
[mono.git] / mono / mini / mini-exceptions.c
index 10cf1b75cb194d9051761962546b5ffba8b9f8f8..707951af02e15c807e7eccced069307a22af527b 100644 (file)
@@ -1415,6 +1415,11 @@ wrap_non_exception_throws (MonoMethod *m)
        int i;
        gboolean val = FALSE;
 
+       if (m->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD) {
+               MonoDynamicMethod *dm = (MonoDynamicMethod *)m;
+               if (dm->assembly)
+                       ass = dm->assembly;
+       }
        g_assert (ass);
        if (ass->wrap_non_exception_throws_inited)
                return ass->wrap_non_exception_throws;
@@ -3263,7 +3268,7 @@ mono_llvm_load_exception (void)
 
        if (mono_ex->trace_ips) {
                GList *trace_ips = NULL;
-               gpointer ip = RETURN_ADDRESS ();
+               gpointer ip = MONO_RETURN_ADDRESS ();
 
                size_t upper = mono_array_length (mono_ex->trace_ips);