Open Bug 1899637 Opened 4 months ago Updated 13 days ago

[wasm-jspi] Only suspend wrapped imports that return Promises.

Categories

(Core :: JavaScript: WebAssembly, task, P2)

task

Tracking

()

People

(Reporter: yury, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Per https://github.com/WebAssembly/js-promise-integration/issues/13#issuecomment-2138093432 :

> I therefore suggest that we revert to the original semantics of imports: suspend if the result of an import call is a Promise (and attach the continuation to the Promise), otherwise simply return the result of the call.

We have decided to only suspend wrapped imports that return Promises.

In our code we always convert call result into a Promise using WasmPIWrapSuspendingImport. Need to extend the logic to shortcut the execution to switch back to suspendable stack with converted results (or exception) when non-Promise is returned.

Severity: -- → N/A
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: