ae11f20e26
A sloppy mode eval call that establishes strict mode will leak that strictness into the sloppy surrounding scope on recompile. This changes the structure of the type feedback vector for the function and crashes follow. The fix is straightforward. BUG=491536, 503565 LOG=N Review URL: https://codereview.chromium.org/1231343003 Cr-Commit-Position: refs/heads/master@{#29671}
11 lines
436 B
JavaScript
11 lines
436 B
JavaScript
// Copyright 2015 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: --expose-debug-as debug
|
|
|
|
if (this["debug"]) debug.Debug.setListener(function() {});
|
|
var source = "var outer = 0; function test() {'use strict'; outer = 1; } test(); print('ok');";
|
|
function test_function() { eval(source); }
|
|
assertDoesNotThrow(test_function);
|