The previous code would convert exceptions into errors which would
be rethrown later, clearing the resume state.
Hopefully fixes https://github.com/dotnet/runtime/issues/38337.
Co-authored-by: vargaz <vargaz@users.noreply.github.com>
context->stack_pointer = (guchar*)sp;
if (context->has_resume_state) {
- // This can happen on wasm !?
- MonoException *thrown_exc = (MonoException*) mono_gchandle_get_target_internal (context->exc_gchandle);
- if (exc)
- *exc = (MonoObject*)thrown_exc;
- else
- mono_error_set_exception_instance (error, thrown_exc);
+ /*
+ * This can happen on wasm where native frames cannot be skipped during EH.
+ * EH processing will continue when control returns to the interpreter.
+ */
return NULL;
}
return (MonoObject*)result.data.p;