Parser::parseVariableDeclarationList should null check the node before attempting...
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Feb 2016 20:09:07 +0000 (20:09 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Feb 2016 20:09:07 +0000 (20:09 +0000)
commit0c4a3f884ceb394964e74de247feb561947b6033
tree5fca2e93f40de9212d8f0575a89fb1d34d5f6b4d
parentacb43ff3dc7a9b8837edff0c4beff47f1a4829a4
Parser::parseVariableDeclarationList should null check the node before attempting to create a new CommaExpr
https://bugs.webkit.org/show_bug.cgi?id=154244
rdar://problem/24290670

Reviewed by Michael Saboff.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::appendToCommaExpr): Catch the bug sooner in debug.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseVariableDeclarationList): Fix the bug.
* tests/stress/for-let-comma.js: Added. This used to crash in debug and release.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196587 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/ASTBuilder.h
Source/JavaScriptCore/parser/Parser.cpp
Source/JavaScriptCore/tests/stress/for-let-comma.js [new file with mode: 0644]