Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v10.x] deps: V8: backport cd21f71f9cb5 #33862

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.56',
'v8_embedder_string': '-node.57',

# Enable disassembler for `--print-code` v8 options
'v8_enable_disassembler': 1,
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/parsing/parser-base.h
Original file line number Diff line number Diff line change
Expand Up @@ -2977,13 +2977,13 @@ ParserBase<Impl>::ParseAssignmentExpression(bool accept_IN, bool* ok) {
// This is definitely not an expression so don't accumulate
// expression-related errors.
productions &= ~ExpressionClassifier::ExpressionProduction;
ValidateAssignmentPattern(CHECK_OK);
}

Accumulate(productions);
if (!Token::IsAssignmentOp(peek())) return expression;

if (is_destructuring_assignment) {
ValidateAssignmentPattern(CHECK_OK);
} else {
Comment on lines 2986 to 2987
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:(

(I guess we should keep the empty if block on the off chance we'd need to backport anything else onto this file in the future.)

expression = CheckAndRewriteReferenceExpression(
expression, lhs_beg_pos, scanner()->location().end_pos,
Expand Down
6 changes: 6 additions & 0 deletions deps/v8/test/mjsunit/regress/regress-8241.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright 2018 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.

function f(x) { }
f(x=>x, [x,y] = [1,2]);