aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsapi/qjsvalue.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-07-01 19:38:42 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-07-02 10:28:58 +0200
commitb85c2deccae3006468eaf3023d5b3bf802739747 (patch)
tree3bcb15a9964015fcbe752ac5a00443359b16894d /src/qml/jsapi/qjsvalue.cpp
parent0e803fb025813d4cd6a7df14695c75776ae7e27b (diff)
Port from implicit to explicit atomic operations
The old code used the implicit conversions from QAtomicPointer<T> to T*, and QAtomicInteger<T> to T, and vice versa. The semantics of these differ from the ones std::atomic uses, so we're going to deprecate these, like we did for load() and store(), too. This patch fixes some users of these APIs before we deprecate them. Change-Id: I892d705c22280f1c6fdc62c1777248b44e9c4329 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsapi/qjsvalue.cpp')
-rw-r--r--src/qml/jsapi/qjsvalue.cpp6
1 files changed, 3 insertions, 3 deletions
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());