nodejs/deps/v8/test/mjsunit/maglev/regress-363983041.js
Michaël Zasso 9087056060 deps: patch V8 to 12.8.374.31
Refs: https://github.com/v8/v8/compare/12.8.374.22...12.8.374.31
PR-URL: https://github.com/nodejs/node/pull/54682
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2024-09-11 07:14:27 +00:00

15 lines
358 B
JavaScript

// Copyright 2024 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(x) {
return new x();
}
%PrepareFunctionForOptimization(foo);
foo(Object);
%OptimizeFunctionOnNextCall(foo);
assertThrows(foo, TypeError);