Skip to content

Commit

Permalink
deps: backport 2cabc86 from upstream V8
Browse files Browse the repository at this point in the history
Original commit message:

    Fix classifier related bug

    R=adamk@chromium.org
    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 <info@bnoordhuis.nl>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
  • Loading branch information
targos authored and MylesBorins committed Mar 28, 2017
1 parent 0e9bd94 commit 9ae46f0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 5
#define V8_MINOR_VERSION 1
#define V8_BUILD_NUMBER 281
#define V8_PATCH_LEVEL 95
#define V8_PATCH_LEVEL 96

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
13 changes: 8 additions & 5 deletions deps/v8/src/parsing/parser-base.h
Original file line number Diff line number Diff line change
Expand Up @@ -1400,11 +1400,14 @@ typename ParserBase<Traits>::ExpressionT ParserBase<Traits>::ParseExpression(
// AssignmentExpression
// Expression ',' AssignmentExpression

ExpressionClassifier binding_classifier(this);
ExpressionT result =
this->ParseAssignmentExpression(accept_IN, &binding_classifier, CHECK_OK);
classifier->Accumulate(&binding_classifier,
ExpressionClassifier::AllProductions);
ExpressionT result = this->EmptyExpression();
{
ExpressionClassifier binding_classifier(this);
result = this->ParseAssignmentExpression(accept_IN, &binding_classifier,
CHECK_OK);
classifier->Accumulate(&binding_classifier,
ExpressionClassifier::AllProductions);
}
bool is_simple_parameter_list = this->IsIdentifier(result);
bool seen_rest = false;
while (peek() == Token::COMMA) {
Expand Down
6 changes: 6 additions & 0 deletions deps/v8/test/mjsunit/harmony/regress/regress-crbug-621111.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

(y = 1[1, [...[]]]) => 1; // will core dump, if not fixed
(y = 1[1, [...[]]]) => {}; // will core dump, if not fixed

0 comments on commit 9ae46f0

Please sign in to comment.