qt5base-lts/tests/manual/wasm/qstdweb
Mikolaj Boc fb8832de9c Make the promises js-less using a newly introduced thunk pool
Since we cannot rely on the clients specifying a suitable CSP that will
not forbid execution of js injections, we have to refrain from using
any explicit <script> elements. To keep the promise system working, a
thunk pool was introduced which keeps track of a limited pool of promise
callback exports. In case the resources are busy, pending calls are
enqueued. This works since the JS Promise.then/catch/finally always fire,
even on ready/failed promises.
As the situation of full thunk pool allocation is unlikely to happen
en masse IRL, the solution should not adversely affect the performance.
Heavy unit tests were created to confirm the solution works as expected.

Task-number: QTBUG-99611
Change-Id: I0e6982d4ee76a4263b59e72b004b3ff2f167e4df
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-07-07 06:28:13 +02:00
..
CMakeLists.txt Port promise tests to qtwasmtestlib 2022-07-06 17:56:57 +02:00
promise_auto.html Port promise tests to qtwasmtestlib 2022-07-06 17:56:57 +02:00
promise_main.cpp Make the promises js-less using a newly introduced thunk pool 2022-07-07 06:28:13 +02:00