From 77c22af561f49bc6a78010564d33fc86eb831519 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 4 Jun 2018 14:59:47 +0200 Subject: Fix handling of elisions in destructuring expressions We need to iterator over elisions at the end, as those could trigger side effects by calling iterator.next() Change-Id: Ieb5fa3562b6e60fdf179fa228510b2eeaaf9da30 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4compilerscanfunctions.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/qml/compiler/qv4compilerscanfunctions.cpp') diff --git a/src/qml/compiler/qv4compilerscanfunctions.cpp b/src/qml/compiler/qv4compilerscanfunctions.cpp index 9605b72b76..e371280b55 100644 --- a/src/qml/compiler/qv4compilerscanfunctions.cpp +++ b/src/qml/compiler/qv4compilerscanfunctions.cpp @@ -184,10 +184,6 @@ bool ScanFunctions::visit(ArrayPattern *ast) ++index; ++index; } - if (ast->elision) { - for (Elision *elision = ast->elision->next; elision; elision = elision->next) - ++index; - } _context->maxNumberOfArguments = qMax(_context->maxNumberOfArguments, index); return true; } -- cgit v1.2.3