Details
Description
There are multiple problems with sending request and QNetworkReply on WebAssembly platform:
- The request can only be send from main thread. There was a fix which proxied request to main thread but it was reverted as it introduced another problems.
- Cancelling the request is done by setting m_fetch->userData to nullptr. This can be done better by calling emscripten_fetch_close().
- Request is not cancel when QNetworkReply is deleted. This can lead to use-after-free by emscripten fetch. Doublecheck the lifetimes of objects passed to emscripten_fetch().
Related: QTBUG-122893