[parser] Relax DCHECK in has_error() case
No-Tree-Checks: true No-Try: true Bug: chromium:908231 Change-Id: I1acf33400ad3546974a0ccb5955f8c6966b17dcf Reviewed-on: https://chromium-review.googlesource.com/c/1350116 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#57815}
This commit is contained in:
parent
0453d41885
commit
536f62c49a
@ -2497,7 +2497,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
|
||||
// immediately). bar can be parsed lazily, but we need to parse it in a mode
|
||||
// that tracks unresolved variables.
|
||||
DCHECK_IMPLIES(parse_lazily(), FLAG_lazy);
|
||||
DCHECK_IMPLIES(parse_lazily(), allow_lazy_);
|
||||
DCHECK_IMPLIES(parse_lazily(), has_error() || allow_lazy_);
|
||||
DCHECK_IMPLIES(parse_lazily(), extension_ == nullptr);
|
||||
|
||||
const bool is_lazy =
|
||||
|
8
test/mjsunit/regress/regress-908231.js
Normal file
8
test/mjsunit/regress/regress-908231.js
Normal file
@ -0,0 +1,8 @@
|
||||
// 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.
|
||||
|
||||
assertThrows(`
|
||||
class C {
|
||||
get [(function() { function lazy() { Syntax Error } })()]() {}
|
||||
}`, SyntaxError)
|
Loading…
Reference in New Issue
Block a user