| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b10cce1 commit 86c7c0a
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,7 @@ | |||
| 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 | ||
| 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 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,23 @@ | |||
| 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 | + `); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments