Skip to content

Commit 7e06e46

Browse files
verwaestV8 LUCI CQ
authored andcommitted
[parser] Set max info id for class initializers
Change-Id: I7cd4d664b3723499f7926d398f62cf2e9ce1ff26 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5713755 Reviewed-by: Leszek Swirski <[email protected]> Auto-Submit: Toon Verwaest <[email protected]> Commit-Queue: Toon Verwaest <[email protected]> Commit-Queue: Leszek Swirski <[email protected]> Cr-Commit-Position: refs/heads/main@{#95076}
1 parent 7819961 commit 7e06e46

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

src/parsing/parser.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ void Parser::ParseFunction(Isolate* isolate, ParseInfo* info,
896896
result = ParseClassForMemberInitialization(
897897
function_kind, start_position, function_literal_id, end_position,
898898
info->function_name());
899-
899+
info->set_max_info_id(GetLastInfoId());
900900
} else if (V8_UNLIKELY(shared_info->private_name_lookup_skips_outer_class() &&
901901
original_scope_->is_class_scope())) {
902902
// If the function skips the outer class and the outer scope is a class, the
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Copyright 2024 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+
// Flags: --allow-natives-syntax
6+
7+
let c = class {
8+
x = eval("");
9+
};
10+
new c;
11+
%ForceFlush(%GetInitializerFunction(c));
12+
new c;

0 commit comments

Comments
 (0)