[MethodImplAttribute(MethodImplOptions.NoInlining)] // https://github.com/dotnet/runtime/issues/71425 public static void MarshalPromise(Span <JSMarshalerArgument> arguments) { fixed(JSMarshalerArgument *ptr = arguments) { Interop.Runtime.MarshalPromise(ptr); ref JSMarshalerArgument exceptionArg = ref arguments[0]; if (exceptionArg.slot.Type != MarshalerType.None) { JSHostImplementation.ThrowException(ref exceptionArg); } }
internal static unsafe void InvokeJSImpl(JSObject jsFunction, Span <JSMarshalerArgument> arguments) { IntPtr functionJSHandle = jsFunction.JSHandle; fixed(JSMarshalerArgument *ptr = arguments) { Interop.Runtime.InvokeJSFunction(functionJSHandle, ptr); ref JSMarshalerArgument exceptionArg = ref arguments[0]; if (exceptionArg.slot.Type != MarshalerType.None) { JSHostImplementation.ThrowException(ref exceptionArg); } }