aa3020565f
When peeking into descriptor arrays (for Function.prototype.bind inlining), we need to check the number of descriptors rather than the length of the DescriptorArray. Bug: chromium:825045 Change-Id: I55dbe1544e5e4cb8e23d873961c71ed12294d89c Reviewed-on: https://chromium-review.googlesource.com/991812 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#52315}
15 lines
416 B
JavaScript
15 lines
416 B
JavaScript
// 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.
|
|
|
|
// Flags: --allow-natives-syntax
|
|
|
|
const obj = new class A extends (async function (){}.constructor) {};
|
|
delete obj.name;
|
|
Number.prototype.__proto__ = obj;
|
|
function foo() { return obj.bind(); }
|
|
foo();
|
|
foo();
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo();
|