Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelsavara committed Feb 2, 2024
1 parent 4f252c3 commit 7b1df18
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/mono/browser/runtime/marshal-to-cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,12 @@ function _marshal_task_to_cs(arg: JSMarshalerArgument, value: Promise<any>, _?:
runtimeHelpers.javaScriptExports.complete_task(gc_handle, false, null, data, res_converter || _marshal_cs_object_to_cs);
}
catch (ex) {
runtimeHelpers.nativeAbort(ex);
try {
loaderHelpers.mono_exit(1, ex);
}
catch (ex2) {
// there is no point to propagate the exception into the unhandled promise rejection
}
}
}

Expand All @@ -383,7 +388,12 @@ function _marshal_task_to_cs(arg: JSMarshalerArgument, value: Promise<any>, _?:
runtimeHelpers.javaScriptExports.complete_task(gc_handle, holder.isCanceled, reason, null, undefined);
}
catch (ex) {
runtimeHelpers.nativeAbort(ex);
try {
loaderHelpers.mono_exit(1, ex);
}
catch (ex2) {
// there is no point to propagate the exception into the unhandled promise rejection
}
}
}

Expand Down

0 comments on commit 7b1df18

Please sign in to comment.