-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[browser] streamline Task/Promise marshalling #93010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[browser] streamline Task/Promise marshalling #93010
Conversation
|
Tagging subscribers to 'arch-wasm': @lewing Issue Detailsnull
|
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
a8d0432 to
e53d763
Compare
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
e53d763 to
8614283
Compare
create_task_callbackcreate_task_callback and mono_wasm_marshal_promise
4bd77bd to
68ae9f1
Compare
create_task_callback and mono_wasm_marshal_promise68ae9f1 to
d6b56c2
Compare
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
maraf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! 👍
...rvices.JavaScript/src/System/Runtime/InteropServices/JavaScript/Interop/JavaScriptExports.cs
Outdated
Show resolved
Hide resolved
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
Re-triggered the builds to pick up the build fixes from #93412 . |
|
/azp run runtime-wasm |
|
Azure Pipelines successfully started running 1 pipeline(s). |
0706b84 to
a55eda9
Compare
|
I moved logging changes to #93472 |
|
Please avoid merging on red when the failure is not known, and especially when the failures are in wasm jobs. If merging any way, then please add an explanation for that. |
This reverts commit 018efc5.
This streamlines passing Promise/Task from two cross-boundary calls per promise argument to one.
Changes
create_task_callbackcomplete_taskmono_wasm_marshal_promiseand rename it tomono_wasm_resolve_or_reject_promiseGCVHandleGCHandlein that it keeps proxy of C# object alive while JS owns it.JSVHandleJSHandlein that it keeps proxy of JS object alive while C# owns it.GetTaskResultDynamicto handlevoidTaskJSObject.DisposeLocalInterop "stack frame"
IntPtrand handles to beI32rather thanU32MarshalerTypefromI32toU8sizeMarshalerType.TaskResolvedandMarshalerType.TaskRejectedJSMarshalerArgumentslotJSMarshalerArgument.ElementTypeto different offsetJSMarshalerArgument.ElementTypenow contains type of the promise's resultJSBindingTypelayout accordingly.2Other
WeakRefInternal<T>ForceDisposeProxiesin the middle of the program because it can't balance C# side of handles