da0af28545
The main reason why we currently don't see this fail is that block-scopes always appear to have an extension: the scope info object is stored there. Bug: Change-Id: I38f0c15387e235eeea9a57c95af0d9eb185dad2a Reviewed-on: https://chromium-review.googlesource.com/785951 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#49585}
12 lines
411 B
JavaScript
12 lines
411 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.
|
|
|
|
// Verifies that DYNAMIC_GLOBAL variables walk the correct context-chain length
|
|
// to reach the sloppy-eval calling function context, including block contexts.
|
|
function test() {
|
|
return eval('var x = 100; { function z() {z}; x }')
|
|
}
|
|
|
|
test();
|