diff options
-rw-r--r-- | src/qml/jsruntime/qv4scopedvalue_p.h | 2 | ||||
-rw-r--r-- | tests/auto/qml/qjsengine/tst_qjsengine.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h index e4aceef3ee..12a6381e6f 100644 --- a/src/qml/jsruntime/qv4scopedvalue_p.h +++ b/src/qml/jsruntime/qv4scopedvalue_p.h @@ -70,7 +70,7 @@ struct ScopedValue; #define CHECK_EXCEPTION() \ do { \ - if (scope.hasException()) { \ + if (scope.hasException() || scope.engine->isInterrupted.loadAcquire()) { \ return QV4::Encode::undefined(); \ } \ } while (false) diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp index 1c895eb793..f1ff396d4f 100644 --- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp +++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp @@ -4888,6 +4888,7 @@ void tst_QJSEngine::interrupt_data() QTest::addRow("labeled continue / %s", mode) << i << "a: while (true) { for (;;) { continue a; } }"; QTest::addRow("labeled break / %s", mode) << i << "while (true) { a: for (;;) { break a; } }"; QTest::addRow("tail call / %s", mode) << i << "'use strict';\nfunction x() { return x(); }; x();"; + QTest::addRow("huge array join / %s", mode) << i << "Array(1E9)|1"; } } |