Remove error_init from native icall wrappers since managed does it.
authorJay Krell <jaykrell@microsoft.com>
Wed, 31 Jul 2019 22:48:43 +0000 (15:48 -0700)
committerJay Krell <jaykrell@microsoft.com>
Wed, 31 Jul 2019 22:49:54 +0000 (15:49 -0700)
Preferable would be native only, i.e. for interpreter and for when
it is actually unused, but ok for now.

Between removing the managed and the native, managed is preserved
in case there uses of MonoError in C# other than icall wrappers.
Keep them safe.

But again ideally move it to native and remove the managed type,
pending debugging WebAssembly failure doing so.

Commit migrated from https://github.com/mono/mono/commit/3db9635bf59b84651329287e4c6b71783d30f8d6

src/mono/mono/metadata/icall-table.h

index e8cb6c8..e9d2283 100644 (file)
@@ -442,7 +442,8 @@ MONO_HANDLE_DECLARE_RAW (id, name, func, rettype, n, argtypes)                      \
        HANDLE_FUNCTION_ENTER ();                                               \
                                                                                \
        /* FIXME Should be ERROR_DECL but for fragile test. */                  \
-       error_init (error);                                                     \
+       /* Managed wrapper already does this. */                                \
+       /* error_init (error); */                                               \
                                                                                \
        MONO_HANDLE_RETURN_BEGIN (rettype)                                      \
                                                                                \