From 78a011b9ba01496ecfdd1cad1f651a89c4aa72e9 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 4 Nov 2024 17:36:03 +0100 Subject: [PATCH] Update the check for WebAssembly JSPI support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At least Chrome 130 (after explicitly enabling "Experimental WebAssembly JavaScript Promise Integration (JSPI)" in ) no longer has WebAssembly.Function, but has WebAssembly.Suspending. Which appears to be in line with what is documented in the 2024-06-04 post at "WebAssembly JSPI has a new API". Change-Id: I6c777801482758864438879057917e2c5faa28a8 Reviewed-by: Morten Johan Sørvig --- src/corelib/platform/wasm/qstdweb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/platform/wasm/qstdweb.cpp b/src/corelib/platform/wasm/qstdweb.cpp index 75e76a6806b..c51c7e827c2 100644 --- a/src/corelib/platform/wasm/qstdweb.cpp +++ b/src/corelib/platform/wasm/qstdweb.cpp @@ -365,7 +365,7 @@ void WebPromiseManager::adoptPromise(emscripten::val target, PromiseCallbacks ca EM_JS(bool, jsHaveAsyncify, (), { return typeof Asyncify !== "undefined"; }); EM_JS(bool, jsHaveJspi, (), - { return typeof Asyncify !== "undefined" && !!Asyncify.makeAsyncFunction && !!WebAssembly.Function; }); + { return typeof Asyncify !== "undefined" && !!Asyncify.makeAsyncFunction && (!!WebAssembly.Function || !!WebAssembly.Suspending); }); #else