summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2018-06-12 18:24:56 +1000
committerLorn Potter <lorn.potter@gmail.com>2018-06-20 05:18:24 +0000
commita62637358f23546a9edef397fd4d5869a16f0645 (patch)
treef1e92981daba2e5672bdd16218da72c7bbeefaae
parent26bd1cb9d24b186c5361e59d4c448bfa93ef740f (diff)
wasm: fix assert crash in debug mode
Change-Id: Ieb72f57bc75465e938538dd6079f43ba49cbed3c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
-rw-r--r--src/qml/qml/qqmltypeloader.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/qml/qml/qqmltypeloader.cpp b/src/qml/qml/qqmltypeloader.cpp
index 1936030666..70ef3d82ff 100644
--- a/src/qml/qml/qqmltypeloader.cpp
+++ b/src/qml/qml/qqmltypeloader.cpp
@@ -860,12 +860,22 @@ void QQmlTypeLoaderThread::loadWithCachedUnitAsync(QQmlDataBlob *b, const QV4::C
void QQmlTypeLoaderThread::callCompleted(QQmlDataBlob *b)
{
b->addref();
+#ifdef QT_NO_THREAD
+ if (!isThisThread())
+ postMethodToThread(&This::callCompletedMain, b);
+ return;
+#endif
postMethodToMain(&This::callCompletedMain, b);
}
void QQmlTypeLoaderThread::callDownloadProgressChanged(QQmlDataBlob *b, qreal p)
{
b->addref();
+#ifdef QT_NO_THREAD
+ if (!isThisThread())
+ postMethodToThread(&This::callDownloadProgressChangedMain, b, p);
+ return;
+#endif
postMethodToMain(&This::callDownloadProgressChangedMain, b, p);
}