diff --git a/src/parser/esprima_cpp/esprima.cpp b/src/parser/esprima_cpp/esprima.cpp index e2a617d90..e6c910768 100644 --- a/src/parser/esprima_cpp/esprima.cpp +++ b/src/parser/esprima_cpp/esprima.cpp @@ -67,8 +67,10 @@ #define BEGIN_FUNCTION_SCANNING(name) \ NEW_FUNCTION_AST_BUILDER() \ + auto oldInParameterParsing = this->context->inParameterParsing; \ auto oldSubCodeBlockIndex = ++this->subCodeBlockIndex; \ auto oldScopeContext = pushScopeContext(name); \ + this->context->inParameterParsing = false; \ if (UNLIKELY(this->currentClassInfo != nullptr)) { \ if (this->currentClassInfo->m_firstMethod \ && this->currentScopeContext == this->currentClassInfo->m_lastMethod->m_nextSibling) { \ @@ -91,7 +93,8 @@ this->lexicalBlockCount = lexicalBlockCountBefore; \ this->currentScopeContext->m_lexicalBlockIndexFunctionLocatedIn = lexicalBlockIndexBefore; \ popScopeContext(oldScopeContext); \ - this->subCodeBlockIndex = oldSubCodeBlockIndex; + this->subCodeBlockIndex = oldSubCodeBlockIndex; \ + this->context->inParameterParsing = oldInParameterParsing; using namespace Escargot::EscargotLexer; @@ -3558,6 +3561,8 @@ class Parser { template ASTNode parseStatementListItem(ASTBuilder& builder) { + checkRecursiveLimit(); + ASTNode statement = nullptr; this->context->isAssignmentTarget = true; this->context->isBindingElement = true; diff --git a/test/vendortest b/test/vendortest index 4d1558bd9..f9d5df51a 160000 --- a/test/vendortest +++ b/test/vendortest @@ -1 +1 @@ -Subproject commit 4d1558bd990f0a5c19d1d430953eba650f2bc87d +Subproject commit f9d5df51a326046dae8c89afef047f053f7be6ab