diff options
-rw-r--r-- | src/qml/jsapi/qjsengine.cpp | 6 | ||||
-rw-r--r-- | src/qml/jsapi/qjsvalue.cpp | 6 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4identifier.cpp | 2 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 4 | ||||
-rw-r--r-- | src/quick/util/qquickpixmapcache.cpp | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp index 7bf2a4d004..1bfd72227f 100644 --- a/src/qml/jsapi/qjsengine.cpp +++ b/src/qml/jsapi/qjsengine.cpp @@ -490,7 +490,7 @@ void QJSEngine::setInterrupted(bool interrupted) */ bool QJSEngine::isInterrupted() const { - return m_v4Engine->isInterrupted; + return m_v4Engine->isInterrupted.loadAcquire(); } static QUrl urlForFileName(const QString &fileName) @@ -550,7 +550,7 @@ QJSValue QJSEngine::evaluate(const QString& program, const QString& fileName, in result = script.run(); if (scope.engine->hasException) result = v4->catchException(); - if (v4->isInterrupted) + if (v4->isInterrupted.loadAcquire()) result = v4->newErrorObject(QStringLiteral("Interrupted")); QJSValue retval(v4, result->asReturnedValue()); @@ -590,7 +590,7 @@ QJSValue QJSEngine::importModule(const QString &fileName) if (m_v4Engine->hasException) return QJSValue(m_v4Engine, m_v4Engine->catchException()); moduleUnit->evaluate(); - if (!m_v4Engine->isInterrupted) + if (!m_v4Engine->isInterrupted.loadAcquire()) return QJSValue(m_v4Engine, moduleNamespace->asReturnedValue()); return QJSValue( diff --git a/src/qml/jsapi/qjsvalue.cpp b/src/qml/jsapi/qjsvalue.cpp index 92eaf1d8ee..c2957dd294 100644 --- a/src/qml/jsapi/qjsvalue.cpp +++ b/src/qml/jsapi/qjsvalue.cpp @@ -769,7 +769,7 @@ QJSValue QJSValue::call(const QJSValueList &args) ScopedValue result(scope, f->call(jsCallData)); if (engine->hasException) result = engine->catchException(); - if (engine->isInterrupted) + if (engine->isInterrupted.loadAcquire()) result = engine->newErrorObject(QStringLiteral("Interrupted")); return QJSValue(engine, result->asReturnedValue()); @@ -827,7 +827,7 @@ QJSValue QJSValue::callWithInstance(const QJSValue &instance, const QJSValueList ScopedValue result(scope, f->call(jsCallData)); if (engine->hasException) result = engine->catchException(); - if (engine->isInterrupted) + if (engine->isInterrupted.loadAcquire()) result = engine->newErrorObject(QStringLiteral("Interrupted")); return QJSValue(engine, result->asReturnedValue()); @@ -877,7 +877,7 @@ QJSValue QJSValue::callAsConstructor(const QJSValueList &args) ScopedValue result(scope, f->callAsConstructor(jsCallData)); if (engine->hasException) result = engine->catchException(); - if (engine->isInterrupted) + if (engine->isInterrupted.loadAcquire()) result = engine->newErrorObject(QStringLiteral("Interrupted")); return QJSValue(engine, result->asReturnedValue()); diff --git a/src/qml/jsruntime/qv4identifier.cpp b/src/qml/jsruntime/qv4identifier.cpp index 49981ecaed..c3d7165f71 100644 --- a/src/qml/jsruntime/qv4identifier.cpp +++ b/src/qml/jsruntime/qv4identifier.cpp @@ -82,7 +82,7 @@ IdentifierHash::IdentifierHash(ExecutionEngine *engine) void IdentifierHash::detach() { - if (!d || d->refCount == 1) + if (!d || d->refCount.loadAcquire() == 1) return; IdentifierHashData *newData = new IdentifierHashData(d); if (d && !d->refCount.deref()) diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index a28752dc3a..b2bbe985d3 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -349,7 +349,7 @@ static struct InstrCount { #undef CHECK_EXCEPTION #endif #define CHECK_EXCEPTION \ - if (engine->hasException || engine->isInterrupted) \ + if (engine->hasException || engine->isInterrupted.loadAcquire()) \ goto handleUnwind static inline Heap::CallContext *getScope(QV4::Value *stack, int level) @@ -1376,7 +1376,7 @@ QV4::ReturnedValue VME::interpret(CppStackFrame *frame, ExecutionEngine *engine, // We do start the exception handler in case of isInterrupted. The exception handler will // immediately abort, due to the same isInterrupted. We don't skip the exception handler // because the current behavior is easier to implement in the JIT. - Q_ASSERT(engine->hasException || engine->isInterrupted || frame->unwindLevel); + Q_ASSERT(engine->hasException || engine->isInterrupted.loadAcquire() || frame->unwindLevel); if (!frame->unwindHandler) { acc = Encode::undefined(); return acc; diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 159479c76f..4d73d72655 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -813,7 +813,7 @@ void QQmlData::signalEmitted(QAbstractDeclarativeData *, QObject *object, int in if (ddata->notifyList && QThread::currentThreadId() != QObjectPrivate::get(object)->threadData->threadId.loadRelaxed()) { - if (!QObjectPrivate::get(object)->threadData->thread) + if (!QObjectPrivate::get(object)->threadData->thread.loadAcquire()) return; QMetaMethod m = QMetaObjectPrivate::signal(object->metaObject(), index); @@ -849,7 +849,7 @@ void QQmlData::signalEmitted(QAbstractDeclarativeData *, QObject *object, int in QQmlThreadNotifierProxyObject *mpo = new QQmlThreadNotifierProxyObject; mpo->target = object; - mpo->moveToThread(QObjectPrivate::get(object)->threadData->thread); + mpo->moveToThread(QObjectPrivate::get(object)->threadData->thread.loadAcquire()); QCoreApplication::postEvent(mpo, ev); } else { diff --git a/src/quick/util/qquickpixmapcache.cpp b/src/quick/util/qquickpixmapcache.cpp index 5f31376599..e55539b4b5 100644 --- a/src/quick/util/qquickpixmapcache.cpp +++ b/src/quick/util/qquickpixmapcache.cpp @@ -834,7 +834,7 @@ void QQuickPixmapReader::processJob(QQuickPixmapReply *runningJob, const QUrl &u } // Might be that the async provider was so quick it emitted the signal before we // could connect to it. - if (static_cast<QQuickImageResponsePrivate*>(QObjectPrivate::get(response))->finished) { + if (static_cast<QQuickImageResponsePrivate*>(QObjectPrivate::get(response))->finished.loadAcquire()) { QMetaObject::invokeMethod(threadObject, "asyncResponseFinished", Qt::QueuedConnection, Q_ARG(QQuickImageResponse*, response)); } |