Skip to content

Commit e1e0890

Browse files
verwaestV8 LUCI CQ
authored andcommitted
[parser] Reset the calls_eval flag after arrow head
Otherwise it's propagated to the parent Bug: chromium:1394973 Change-Id: I178f9d5d863aec501525a783846d1df6d3031bb2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4100687 Commit-Queue: Toon Verwaest <[email protected]> Auto-Submit: Toon Verwaest <[email protected]> Reviewed-by: Igor Sheludko <[email protected]> Commit-Queue: Igor Sheludko <[email protected]> Cr-Commit-Position: refs/heads/main@{#84808}
1 parent b095103 commit e1e0890

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

src/ast/scopes.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,7 @@ void Scope::Snapshot::Reparent(DeclarationScope* new_parent) {
929929
// Move eval calls since Snapshot's creation into new_parent.
930930
if (outer_scope_->calls_eval_) {
931931
new_parent->RecordEvalCall();
932+
outer_scope_->calls_eval_ = false;
932933
declaration_scope_->sloppy_eval_can_extend_vars_ = false;
933934
}
934935
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright 2022 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: --stress-lazy-source-positions
6+
7+
((__v_0 = ((__v_0 =eval()) => {})()) => {})()

0 commit comments

Comments
 (0)