Merge pull request #3262 from lindenlab/add_continuations_test
[mono.git] / mono / mini / mini-ppc.c
index c9116ff46e1e6a974f1e5391de97731bc38bd90e..3089a8546b1d3a4d605535a775c1f57d27eb793f 100644 (file)
@@ -4743,19 +4743,20 @@ mono_arch_register_lowlevel_calls (void)
 
 #ifndef DISABLE_JIT
 void
-mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors, MonoError *error)
 {
        MonoJumpInfo *patch_info;
        gboolean compile_aot = !run_cctors;
-       MonoError error;
+
+       mono_error_init (error);
 
        for (patch_info = ji; patch_info; patch_info = patch_info->next) {
                unsigned char *ip = patch_info->ip.i + code;
                unsigned char *target;
                gboolean is_fd = FALSE;
 
-               target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, &error);
-               mono_error_raise_exception (&error); /* FIXME: don't raise here */
+               target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, error);
+               return_if_nok (error);
 
                if (compile_aot) {
                        switch (patch_info->type) {