From 5de48ee56a5afb0045d40851a4a1dd79db82c772 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 4 Feb 2019 12:02:01 +0100 Subject: QMLJS: Have ScanFunctions iterate over ArrayPattern nodes Like Codegen, have ScanFunctions iterate over the elements in an ArrayPattern, instead of recursing over the tail of the element list. This prevents running out of (native) stack, or hitting the recursion check limiter. Change-Id: I8203af3119ad50f19000a215af42649d9bcb3784 Fixes: QTBUG-73425 Reviewed-by: Lars Knoll --- src/qml/compiler/qv4compilerscanfunctions_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/qml/compiler/qv4compilerscanfunctions_p.h') diff --git a/src/qml/compiler/qv4compilerscanfunctions_p.h b/src/qml/compiler/qv4compilerscanfunctions_p.h index 4463a4f4f3..28ad846bcd 100644 --- a/src/qml/compiler/qv4compilerscanfunctions_p.h +++ b/src/qml/compiler/qv4compilerscanfunctions_p.h @@ -120,6 +120,7 @@ protected: bool visit(AST::TemplateLiteral *ast) override; bool visit(AST::SuperLiteral *) override; bool visit(AST::FieldMemberExpression *) override; + bool visit(AST::ArrayPattern *) override; bool enterFunction(AST::FunctionExpression *ast, bool enterName); -- cgit v1.2.3