[runtime] Add MonoError to mono_remote_class
[mono.git] / mono / metadata / sgen-mono.c
index e070fed4ad436d1530110f0d72f23740bf334ab9..8421b903ba6f967366bba0f2d7c7b337510ac1ee 100644 (file)
@@ -1388,12 +1388,13 @@ create_allocator (int atype, gboolean slowpath)
        info->d.alloc.gc_name = "sgen";
        info->d.alloc.alloc_type = atype;
 
-       res = mono_mb_create (mb, csig, 8, info);
-       mono_mb_free (mb);
 #ifndef DISABLE_JIT
-       mono_method_get_header (res)->init_locals = FALSE;
+       mb->init_locals = FALSE;
 #endif
 
+       res = mono_mb_create (mb, csig, 8, info);
+       mono_mb_free (mb);
+
 
        return res;
 }
@@ -2341,8 +2342,6 @@ mono_gc_scan_object (void *obj, void *gc_data)
 void
 sgen_client_scan_thread_data (void *start_nursery, void *end_nursery, gboolean precise, ScanCopyContext ctx)
 {
-       SgenThreadInfo *info;
-
        scan_area_arg_start = start_nursery;
        scan_area_arg_end = end_nursery;
 
@@ -2396,7 +2395,7 @@ sgen_client_scan_thread_data (void *start_nursery, void *end_nursery, gboolean p
                                }
                        }
                }
-       } END_FOREACH_THREAD
+       } FOREACH_THREAD_END
 }
 
 /*