[parser] Fix aborting preparsing of a function with a rest param.
BUG=chromium:813630 Change-Id: I9eeaeb8830533c178c8073f48f036f9af8887a55 Reviewed-on: https://chromium-review.googlesource.com/972901 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#52095}
This commit is contained in:
parent
1ce0faedc1
commit
4f506dbeec
@ -1492,6 +1492,7 @@ void DeclarationScope::ResetAfterPreparsing(AstValueFactory* ast_value_factory,
|
||||
unresolved_ = nullptr;
|
||||
sloppy_block_function_map_ = nullptr;
|
||||
rare_data_ = nullptr;
|
||||
has_rest_ = false;
|
||||
|
||||
if (aborted) {
|
||||
// Prepare scope for use in the outer zone.
|
||||
|
22
test/mjsunit/regress/regress-crbug-813630.js
Normal file
22
test/mjsunit/regress/regress-crbug-813630.js
Normal file
@ -0,0 +1,22 @@
|
||||
// Copyright 2018 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.
|
||||
|
||||
// Regression test for a bug where aborting a function which has a rest
|
||||
// parameter didn't work correctly.
|
||||
function g(...args) {
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;x;
|
||||
}
|
Loading…
Reference in New Issue
Block a user