Don't simulate main loop with JSPI
This is not needed, as main loop just works with awaited calls thanks to JS suspender objects with JSPI enabled. Fixes: QTBUG-114651 Change-Id: I94e187953ac8cec5c999f1b02508efecc19641f6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
4d1525b0b8
commit
b96a38acd2
@ -431,10 +431,14 @@ void QEventDispatcherWasm::handleApplicationExec()
|
||||
// Note that we don't use asyncify here: Emscripten supports one level of
|
||||
// asyncify only and we want to reserve that for dialog exec() instead of
|
||||
// using it for the one qApp exec().
|
||||
const bool simulateInfiniteLoop = true;
|
||||
emscripten_set_main_loop([](){
|
||||
emscripten_pause_main_loop();
|
||||
}, 0, simulateInfiniteLoop);
|
||||
// When JSPI is used, awaited async calls are allowed to be nested, so we
|
||||
// proceed normally.
|
||||
if (!qstdweb::haveJspi()) {
|
||||
const bool simulateInfiniteLoop = true;
|
||||
emscripten_set_main_loop([](){
|
||||
emscripten_pause_main_loop();
|
||||
}, 0, simulateInfiniteLoop);
|
||||
}
|
||||
}
|
||||
|
||||
void QEventDispatcherWasm::handleDialogExec()
|
||||
|
Loading…
Reference in New Issue
Block a user