diff options
| author | Liang Qi <liang.qi@qt.io> | 2016-08-18 09:47:06 +0200 |
|---|---|---|
| committer | Liang Qi <liang.qi@qt.io> | 2016-08-18 09:47:21 +0200 |
| commit | 5df9fb29e13800932e00800059ba431a95de160b (patch) | |
| tree | 096a61564b0f5ee4a62549f2685cbe6a9b2261bf /src/qml/compiler/qv4codegen.cpp | |
| parent | b03c85de2ab337858b44bf0a21692d7b544313a5 (diff) | |
| parent | 4840bc0c207aa09b4332842c67e65bc92f43d3bd (diff) | |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I20c622263f40c322954328e4d10a8071db3ca6d1
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 ad28e4d6d1..461ff89550 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -2512,6 +2512,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); |
