diff options
author | Piotr Wierciński <[email protected]> | 2024-04-04 10:20:59 +0000 |
---|---|---|
committer | Qt Cherry-pick Bot <[email protected]> | 2024-04-11 21:45:30 +0000 |
commit | d6863a8028ce4f706fe7f426a8d5a5a8f6f182db (patch) | |
tree | f9e25831139988ab06467bd749fe530e15e6b3c6 | |
parent | 719121366cd854e1d4cb4354defeeb9753e22c0f (diff) |
Revert "wasm: Proxy emscripten_fetch() to the main thread"
This reverts commit f2f2b6ef18907a76461b54e110618e7840971fa7.
Reason for revert: There are couple of issues introduced. Lets revert to base revision and go with fixes from there.
Change-Id: I8341de42ef3e4a609bfbffdb763dd5c28794473c
Reviewed-by: Morten Johan Sørvig <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Even Oscar Andersen <[email protected]>
(cherry picked from commit 157c9eef48916c3e11f43ffb0fe8e8030bed8d06)
Reviewed-by: Piotr Wierciński <[email protected]>
(cherry picked from commit bc9d2230d85a694a9a4a2b358e4a299960a51c2a)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_wasm_p.h | 2 | ||||
-rw-r--r-- | src/network/access/qnetworkreplywasmimpl.cpp | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_wasm_p.h b/src/corelib/kernel/qeventdispatcher_wasm_p.h index 1e5b520948a..f7d8b955e85 100644 --- a/src/corelib/kernel/qeventdispatcher_wasm_p.h +++ b/src/corelib/kernel/qeventdispatcher_wasm_p.h @@ -51,7 +51,6 @@ public: void wakeUp() override; static void runOnMainThread(std::function<void(void)> fn); - static void runOnMainThreadAsync(std::function<void(void)> fn); static void socketSelect(int timeout, int socket, bool waitForRead, bool waitForWrite, bool *selectForRead, bool *selectForWrite, bool *socketDisconnect); protected: @@ -88,6 +87,7 @@ private: static void run(std::function<void(void)> fn); static void runAsync(std::function<void(void)> fn); + static void runOnMainThreadAsync(std::function<void(void)> fn); static QEventDispatcherWasm *g_mainThreadEventDispatcher; diff --git a/src/network/access/qnetworkreplywasmimpl.cpp b/src/network/access/qnetworkreplywasmimpl.cpp index 43f007a1da9..1be13f15dfb 100644 --- a/src/network/access/qnetworkreplywasmimpl.cpp +++ b/src/network/access/qnetworkreplywasmimpl.cpp @@ -9,7 +9,6 @@ #include <QtCore/qcoreapplication.h> #include <QtCore/qfileinfo.h> #include <QtCore/qthread.h> -#include <QtCore/private/qeventdispatcher_wasm_p.h> #include <QtCore/private/qoffsetstringarray_p.h> #include <QtCore/private/qtools_p.h> @@ -296,10 +295,7 @@ void QNetworkReplyWasmImplPrivate::doSendRequest() QByteArray destinationPath = dPath.toUtf8(); attr.destinationPath = destinationPath.constData(); - auto url = request.url().toString().toUtf8(); - QEventDispatcherWasm::runOnMainThread([attr, url]() mutable { - emscripten_fetch(&attr, url); - }); + m_fetch = emscripten_fetch(&attr, request.url().toString().toUtf8()); state = Working; } |