[remoting] If remoting is disabled, don't assert looking for LoadRemoteFieldNew ...
authorAleksey Kliger (λgeek) <akliger@gmail.com>
Fri, 1 Jul 2016 15:11:54 +0000 (11:11 -0400)
committerGitHub <noreply@github.com>
Fri, 1 Jul 2016 15:11:54 +0000 (11:11 -0400)
mono/metadata/remoting.c

index a275cf09c8971f153a2f236c1adc18264bbcdb4c..67a7b7f827d3cf8b5670427576d5f70f758b7ea4 100644 (file)
@@ -1376,10 +1376,12 @@ mono_marshal_get_ldfld_wrapper (MonoType *type)
        if ((res = mono_marshal_find_in_cache (cache, klass)))
                return res;
 
+#ifndef DISABLE_REMOTING
        if (!tp_load) {
                tp_load = mono_class_get_method_from_name (mono_defaults.transparent_proxy_class, "LoadRemoteFieldNew", -1);
                g_assert (tp_load != NULL);
        }
+#endif
 
        /* we add the %p pointer value of klass because class names are not unique */
        name = g_strdup_printf ("__ldfld_wrapper_%p_%s.%s", klass, klass->name_space, klass->name); 
@@ -1397,6 +1399,7 @@ mono_marshal_get_ldfld_wrapper (MonoType *type)
        mono_mb_emit_ldarg (mb, 0);
        pos0 = mono_mb_emit_proxy_check (mb, CEE_BNE_UN);
 
+#ifndef DISABLE_REMOTING
        mono_mb_emit_ldarg (mb, 0);
        mono_mb_emit_ldarg (mb, 1);
        mono_mb_emit_ldarg (mb, 2);
@@ -1421,6 +1424,7 @@ mono_marshal_get_ldfld_wrapper (MonoType *type)
        } else {
                mono_mb_emit_byte (mb, CEE_RET);
        }
+#endif
 
        mono_mb_patch_branch (mb, pos0);