v8/test/mjsunit/regress/regress-1021712.js
Nico Hartmann 0fc1f3a9b7 Fixes argument CHECKs in serializer that are too strict
Bug: chromium:1021712
Change-Id: I9523760f2fa11726dd7015058b2267035f3f9f7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1903442
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64842}
2019-11-07 16:51:16 +00:00

19 lines
386 B
JavaScript

// Copyright 2019 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 f() {
Promise.prototype.then.call()
}
%PrepareFunctionForOptimization(f);
try {
f();
} catch (e) {}
%OptimizeFunctionOnNextCall(f);
assertThrows(() => f(), TypeError);