aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2019-01-18 14:12:21 +0100
committerLars Knoll <lars.knoll@qt.io>2019-01-30 14:39:52 +0000
commit729b1ceb8904a857ba4c804e8a58b9ef4ef7b193 (patch)
treea710f13563519b5435d1af2d13fdd9e5ea884f67 /src/qml/compiler
parent679a9972b46b0ebd03444f3c08ce7d3424c494f9 (diff)
Correctly scope unwind handlers for try blocks
Make sure the unwind handler is always reset when leaving the try block. This exposes a couple of failures in the ECMAScript test suite that were before passing by pure luck. Task-number: QTBUG-72858 Change-Id: I014b1e37c2beff136ecd53a665a2f10933f7e12c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler')
-rw-r--r--src/qml/compiler/qv4codegen.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index f570af4819..0696cb4a3a 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -3662,15 +3662,12 @@ void Codegen::handleTryCatch(TryStatement *ast)
{
Q_ASSERT(ast);
RegisterScope scope(this);
- BytecodeGenerator::Label noException = bytecodeGenerator->newLabel();
{
ControlFlowCatch catchFlow(this, ast->catchExpression);
RegisterScope scope(this);
TailCallBlocker blockTailCalls(this); // IMPORTANT: destruction will unblock tail calls before catch is generated
statement(ast->statement);
- bytecodeGenerator->jump().link(noException);
}
- noException.link();
}
void Codegen::handleTryFinally(TryStatement *ast)