742873c652
The stack overflow used to occur when too many bound functions are nested. The CL also adds a regression test. Bug: chromium:1226264 Change-Id: I34329d8392d2385207dbd9a8d3188ad4f7cb3c2d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3011161 Commit-Queue: Maya Lekova <mslekova@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#75640}
19 lines
397 B
JavaScript
19 lines
397 B
JavaScript
// Copyright 2021 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: --allow-natives-syntax
|
|
|
|
function foo() {
|
|
};
|
|
for (var i = 0; i < 40000; i++) {
|
|
foo = foo.bind();
|
|
}
|
|
function bar() {
|
|
new foo();
|
|
};
|
|
%PrepareFunctionForOptimization(bar);
|
|
bar();
|
|
%OptimizeFunctionOnNextCall(bar);
|
|
bar();
|