aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtime.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-08-26 21:25:01 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-08-28 21:45:53 +0000
commitf497bd50456efb7adbcb4be88c0ba2310445d166 (patch)
tree2082d835820907e0b1ac1f7ee99fe5d272f97d32 /src/qml/jsruntime/qv4runtime.cpp
parent94f0d86b5d4c52a6af4843d05d47e7dcf2d1acaa (diff)
Fix Map and WeakMap constructor
Change-Id: I52c31a006b80430ea949eaac246301e51a430f89 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4runtime.cpp')
-rw-r--r--src/qml/jsruntime/qv4runtime.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4runtime.cpp b/src/qml/jsruntime/qv4runtime.cpp
index 54898ca6a1..bc60dba142 100644
--- a/src/qml/jsruntime/qv4runtime.cpp
+++ b/src/qml/jsruntime/qv4runtime.cpp
@@ -759,11 +759,15 @@ ReturnedValue Runtime::method_iteratorNext(ExecutionEngine *engine, const Value
if (!o)
return engine->throwTypeError();
ScopedValue d(scope, o->get(engine->id_done()));
+ if (scope.hasException())
+ return Encode::undefined();
bool done = d->toBoolean();
if (done) {
*value = Encode::undefined();
} else {
*value = o->get(engine->id_value());
+ if (scope.hasException())
+ return Encode::undefined();
}
return Encode(done);
}