Example #1
0
        public unsafe void ToManaged(out JSObject?[]?value)
        {
            if (slot.Type == MarshalerType.None)
            {
                value = null;
                return;
            }

            value = new JSObject?[slot.Length];
            JSMarshalerArgument *payload = (JSMarshalerArgument *)slot.IntPtrValue;

            for (int i = 0; i < slot.Length; i++)
            {
                ref JSMarshalerArgument arg = ref payload[i];
                JSObject?val;
                arg.ToManaged(out val);
                value[i] = val;
            }
Example #2
0
 [MethodImpl(MethodImplOptions.NoInlining)] // https://github.com/dotnet/runtime/issues/71425
 // the marshaled signature is:
 // Task<int>? CallEntrypoint(MonoMethod* entrypointPtr, string[] args)
 public static void CallEntrypoint(JSMarshalerArgument *arguments_buffer)
 {
     ref JSMarshalerArgument arg_exc    = ref arguments_buffer[0]; // initialized by caller in alloc_stack_frame()