[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 <verwaest@chromium.org> Auto-Submit: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Commit-Queue: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/main@{#84808}
This commit is contained in:
parent
b095103b7e
commit
e1e08901c2
@ -929,6 +929,7 @@ void Scope::Snapshot::Reparent(DeclarationScope* new_parent) {
|
||||
// Move eval calls since Snapshot's creation into new_parent.
|
||||
if (outer_scope_->calls_eval_) {
|
||||
new_parent->RecordEvalCall();
|
||||
outer_scope_->calls_eval_ = false;
|
||||
declaration_scope_->sloppy_eval_can_extend_vars_ = false;
|
||||
}
|
||||
}
|
||||
|
7
test/mjsunit/regress/regress-crbug-1394973.js
Normal file
7
test/mjsunit/regress/regress-crbug-1394973.js
Normal file
@ -0,0 +1,7 @@
|
||||
// Copyright 2022 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.
|
||||
|
||||
// Flags: --stress-lazy-source-positions
|
||||
|
||||
((__v_0 = ((__v_0 =eval()) => {})()) => {})()
|
Loading…
Reference in New Issue
Block a user