9128e8bf1b
Move the object and array literal flag and depth initialization to when they are visited by the bytecode generator. This avoids issues with doing this initialization before we know whether the (syntactic) literal is actually a literal value or a destructuring assignment. Bug: chromium:795922 Bug: v8:7178 Change-Id: I022178ab4bc9e71f80560f3b78a759d95d4d0584 Reviewed-on: https://chromium-review.googlesource.com/833882 Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#50204}
10 lines
289 B
JavaScript
10 lines
289 B
JavaScript
// Copyright 2017 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(
|
|
// Should throw a syntax error, but not crash.
|
|
"({ __proto__: null, __proto__: 1 })",
|
|
SyntaxError
|
|
);
|