Skip to content

Commit 5dd167b

Browse files
targosMylesBorins
authored andcommitted
deps: backport 2cabc86 from upstream V8
Original commit message: Fix classifier related bug [email protected] BUG=chromium:621111 LOG=N Review-Url: https://codereview.chromium.org/2086513002 Cr-Commit-Position: refs/heads/master@{#37150} Fixes: #11977 PR-URL: #12037 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Myles Borins <[email protected]>
1 parent a0e1b1e commit 5dd167b

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

deps/v8/include/v8-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 5
1212
#define V8_MINOR_VERSION 1
1313
#define V8_BUILD_NUMBER 281
14-
#define V8_PATCH_LEVEL 95
14+
#define V8_PATCH_LEVEL 96
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/src/parsing/parser-base.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,11 +1400,14 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParseExpression(
14001400
// AssignmentExpression
14011401
// Expression ',' AssignmentExpression
14021402

1403-
ExpressionClassifier binding_classifier(this);
1404-
ExpressionT result =
1405-
this->ParseAssignmentExpression(accept_IN, &binding_classifier, CHECK_OK);
1406-
classifier->Accumulate(&binding_classifier,
1407-
ExpressionClassifier::AllProductions);
1403+
ExpressionT result = this->EmptyExpression();
1404+
{
1405+
ExpressionClassifier binding_classifier(this);
1406+
result = this->ParseAssignmentExpression(accept_IN, &binding_classifier,
1407+
CHECK_OK);
1408+
classifier->Accumulate(&binding_classifier,
1409+
ExpressionClassifier::AllProductions);
1410+
}
14081411
bool is_simple_parameter_list = this->IsIdentifier(result);
14091412
bool seen_rest = false;
14101413
while (peek() == Token::COMMA) {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Copyright 2016 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
(y = 1[1, [...[]]]) => 1; // will core dump, if not fixed
6+
(y = 1[1, [...[]]]) => {}; // will core dump, if not fixed

0 commit comments

Comments
 (0)