Debian Codegraph @

js/src/tests/test262/built-ins/Proxy/construct/trap-is-not-callable-realm.js

raw
1 // Copyright (C) 2016 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 esid: sec-proxy-object-internal-methods-and-internal-slots-construct-argumentslist-newtarget
5 description: >
6 Throws if trap is not callable (honoring the Realm of the current execution
7 context)
8 features: [cross-realm, Proxy]
9 ---*/
10
11 var OProxy = $262.createRealm().global.Proxy;
12 var p = new OProxy(function() {}, {
13 construct: {}
14 });
15
16 assert.throws(TypeError, function() {
17 new p();
18 });
19
20 reportCompare(0, 0);