aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-10-21 13:07:33 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-29 10:38:53 +0100
commit59cc901d3d15079b3666e5902b4c8b1a83ff1fd2 (patch)
tree893b6f17d2ee47c9280bb95783e7f8afb67614b2 /src/qml/compiler/qv4codegen_p.h
parent4f8df70107d17922303bb21db5a2cf92aa1aff99 (diff)
Exit the codegen in case we have thrown a parse error
This makes sure we get the right exception in the engine in case there are multiple parse errors in the code, and avoids running into assertions. Change-Id: I8a11c6d043d09caf57a3e4c6aad5834e99cc1761 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4codegen_p.h')
-rw-r--r--src/qml/compiler/qv4codegen_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/compiler/qv4codegen_p.h b/src/qml/compiler/qv4codegen_p.h
index b0d1962bca..dee9e13097 100644
--- a/src/qml/compiler/qv4codegen_p.h
+++ b/src/qml/compiler/qv4codegen_p.h
@@ -428,7 +428,7 @@ protected:
virtual bool visit(AST::UiScriptBinding *ast);
virtual bool visit(AST::UiSourceElement *ast);
- void throwSyntaxErrorOnEvalOrArgumentsInStrictMode(V4IR::Expr* expr, const AST::SourceLocation &loc);
+ bool throwSyntaxErrorOnEvalOrArgumentsInStrictMode(V4IR::Expr* expr, const AST::SourceLocation &loc);
virtual void throwSyntaxError(const AST::SourceLocation &loc, const QString &detail);
virtual void throwReferenceError(const AST::SourceLocation &loc, const QString &detail);
@@ -453,6 +453,7 @@ protected:
QStack<V4IR::BasicBlock *> _exceptionHandlers;
bool _strictMode;
+ bool hasError;
QList<QQmlError> _errors;
class ScanFunctions: protected Visitor