0fc1f3a9b7
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}
19 lines
386 B
JavaScript
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);
|