GeezerVison is showing github.com — deps: V8: cherry-pick 6a4cd97d6691 · nodejs/node@86c7c0a
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: common.gypi +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
36 | 36 |
|
37 | 37 | # Reset this number to 0 on major V8 upgrades. |
38 | 38 | # Increment by one for each non-official patch applied to deps/v8. |
39 | | - 'v8_embedder_string': '-node.34', |
| 39 | + 'v8_embedder_string': '-node.35', |
40 | 40 |
|
41 | 41 | ##### V8 defaults for Node.js ##### |
42 | 42 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: deps/v8/src/ast/ast-function-literal-id-reindexer.cc +5-4Lines changed: 5 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -54,10 +54,10 @@ void AstFunctionLiteralIdReindexer::VisitClassLiteral(ClassLiteral* expr) { |
54 | 54 | // Private fields have their key and value present in |
55 | 55 | // instance_members_initializer_function, so they will |
56 | 56 | // already have been visited. |
57 | | - if (prop->value()->IsFunctionLiteral()) { |
58 | | - Visit(prop->value()); |
59 | | - } else { |
| 57 | + if (prop->kind() == ClassLiteralProperty::Kind::FIELD) { |
60 | 58 | CheckVisited(prop->value()); |
| 59 | + } else { |
| 60 | + Visit(prop->value()); |
61 | 61 | } |
62 | 62 | } |
63 | 63 | ZonePtrList<ClassLiteral::Property>* props = expr->public_members(); |
@@ -67,7 +67,8 @@ void AstFunctionLiteralIdReindexer::VisitClassLiteral(ClassLiteral* expr) { |
67 | 67 | // Public fields with computed names have their key |
68 | 68 | // and value present in instance_members_initializer_function, so they will |
69 | 69 | // already have been visited. |
70 | | - if (prop->is_computed_name() && !prop->value()->IsFunctionLiteral()) { |
| 70 | + if (prop->is_computed_name() && |
| 71 | + prop->kind() == ClassLiteralProperty::Kind::FIELD) { |
71 | 72 | if (!prop->key()->IsLiteral()) { |
72 | 73 | CheckVisited(prop->key()); |
73 | 74 | } |
|
Collapse file
Copy file name to clipboard +23Lines changed: 23 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +// Copyright 2020 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 | +// Public function field with computed name |
| 6 | +eval(` |
| 7 | + buggy = ((bug = new class { [0] = x => 1337.0; }) => bug); |
| 8 | +`); |
| 9 | + |
| 10 | +// Public method with computed name |
| 11 | +eval(` |
| 12 | + buggy = ((bug = new class { [0](x) { return 1337.0}; }) => bug); |
| 13 | +`); |
| 14 | + |
| 15 | +// Private function field with computed name |
| 16 | +eval(` |
| 17 | + buggy = ((bug = new class { #foo = x => 1337.0; }) => bug); |
| 18 | +`); |
| 19 | + |
| 20 | +// Private method with computed name |
| 21 | +eval(` |
| 22 | + buggy = ((bug = new class { #foo(x) { return 1337.0; } }) => bug); |
| 23 | +`); |