aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-04-24 18:05:46 +0200
committerUlf Hermann <ulf.hermann@qt.io>2021-06-30 11:23:08 +0200
commit8635e5b300298c01ada7dc51bfca76c3f02bfc14 (patch)
treef7e797d9ab242c82659258ff4829a7e2a65ee1ed /src/qml/jsruntime/qv4runtime.cpp
parent88e2b6316effd0a570b49e7e9f6f6378078c12a4 (diff)
Use QV4::Scope::hasException() where applicable
It is shorter and encapsulates the exception handling a bit. Change-Id: I8e2dc0eb3b930e222b8cb4852b73d99ca18a0379 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 0ae7fbb180..354ff8e41b 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -330,7 +330,7 @@ Bool Runtime::DeleteProperty_NoThrow::call(ExecutionEngine *engine, const Value
{
Scope scope(engine);
ScopedObject o(scope, base.toObject(engine));
- if (scope.engine->hasException)
+ if (scope.hasException())
return Encode::undefined();
Q_ASSERT(o);
@@ -1587,11 +1587,11 @@ static CallArgs createSpreadArguments(Scope &scope, Value *argv, int argc)
// spread element
++i;
it = Runtime::GetIterator::call(scope.engine, argv[i], /* ForInIterator */ 1);
- if (scope.engine->hasException)
+ if (scope.hasException())
return { nullptr, 0 };
while (1) {
done = Runtime::IteratorNext::call(scope.engine, it, v);
- if (scope.engine->hasException)
+ if (scope.hasException())
return { nullptr, 0 };
Q_ASSERT(done->isBoolean());
if (done->booleanValue())