wasm: remove message handler lock

We have now upgraded the minimum emsdk to one where Emscripten properly
synchronizes stdout/stderr output.

Pick-to: 6.4
Change-Id: I537897b31916a52303a3fdb1d255f03b4aeaffef
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
Morten Sørvig 2022-05-24 14:44:57 +02:00
parent 9be0f2945d
commit 36fa489cb8

View File

@ -1789,13 +1789,6 @@ static void stderr_message_handler(QtMsgType type, const QMessageLogContext &con
if (formattedMessage.isNull()) if (formattedMessage.isNull())
return; return;
#ifdef Q_OS_WASM
// Prevent thread cross-talk, which causes Emscripten to log
// non-valid UTF-8. FIXME: remove once we upgrade to emsdk > 2.0.30
Q_CONSTINIT static QBasicMutex m;
auto locker = qt_unique_lock(m);
#endif
fprintf(stderr, "%s\n", formattedMessage.toLocal8Bit().constData()); fprintf(stderr, "%s\n", formattedMessage.toLocal8Bit().constData());
fflush(stderr); fflush(stderr);
} }