-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[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_callback
create_task_callback
and mono_wasm_marshal_promise
4bd77bd
to
68ae9f1
Compare
create_task_callback
and mono_wasm_marshal_promise
68ae9f1
to
d6b56c2
Compare
/azp run runtime-wasm |
Azure Pipelines successfully started running 1 pipeline(s). |
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_callback
complete_task
mono_wasm_marshal_promise
and rename it tomono_wasm_resolve_or_reject_promise
GCVHandle
GCHandle
in that it keeps proxy of C# object alive while JS owns it.JSVHandle
JSHandle
in that it keeps proxy of JS object alive while C# owns it.GetTaskResultDynamic
to handlevoid
TaskJSObject.DisposeLocal
Interop "stack frame"
IntPtr
and handles to beI32
rather thanU32
MarshalerType
fromI32
toU8
sizeMarshalerType.TaskResolved
andMarshalerType.TaskRejected
JSMarshalerArgument
slotJSMarshalerArgument.ElementType
to different offsetJSMarshalerArgument.ElementType
now contains type of the promise's resultJSBindingType
layout accordingly.2
Other
WeakRefInternal<T>
ForceDisposeProxies
in the middle of the program because it can't balance C# side of handles