diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-08-23 16:39:29 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2016-08-23 16:43:58 +0200 |
commit | e2736212a7762d8c6d474d64bec1df87799cf33b (patch) | |
tree | 9d5c88e10d32fd872c3ab6b8d312fc9f350c26d4 /src/qml/compiler/qv4codegen.cpp | |
parent | 3eed20c22ee046c42fec81b0d9d6e47a27bdbe03 (diff) | |
parent | 8eeede619f417904cbd33fd44143f857dfce0996 (diff) |
Merge branch remote-tracking branch '5.8' into wip/pointerhandler
Change-Id: I1750ed28c5fda878a0a8f2b7bfe4c580c0b7ffe3
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index 4130ad08d7..e0def1021b 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -2513,6 +2513,13 @@ bool Codegen::visit(ReturnStatement *ast) Result expr = expression(ast->expression); move(_block->TEMP(_returnAddress), *expr); } + + // Since we're leaving, don't let any finally statements we emit as part of the unwinding + // jump to exception handlers at run-time if they throw. + IR::BasicBlock *unwindBlock = _function->newBasicBlock(/*no exception handler*/Q_NULLPTR); + _block->JUMP(unwindBlock); + _block = unwindBlock; + unwindException(0); _block->JUMP(_exitBlock); |