+ finalizer = mono_class_get_finalizer (o->vtable->klass);
+
+#ifndef DISABLE_COM
+ /* If object has a CCW but has no finalizer, it was only
+ * registered for finalization in order to free the CCW.
+ * Else it needs the regular finalizer run.
+ * FIXME: what to do about ressurection and suppression
+ * of finalizer on object with CCW.
+ */
+ if (mono_marshal_free_ccw (o) && !finalizer) {
+ mono_domain_set_internal (caller_domain);
+ return;
+ }
+#endif
+
+ /*
+ * To avoid the locking plus the other overhead of mono_runtime_invoke (),
+ * create and precompile a wrapper which calls the finalize method using
+ * a CALLVIRT.
+ */
+ if (!domain->finalize_runtime_invoke) {
+ MonoMethod *invoke = mono_marshal_get_runtime_invoke (mono_class_get_method_from_name_flags (mono_defaults.object_class, "Finalize", 0, 0), TRUE);
+
+ domain->finalize_runtime_invoke = mono_compile_method (invoke);
+ }
+
+ runtime_invoke = domain->finalize_runtime_invoke;
+
+ mono_runtime_class_init (o->vtable);
+
+ runtime_invoke (o, NULL, &exc, NULL);