Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/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 es6id: 9.5.14
6 description: >
7 Throws if trap is not callable (honoring the Realm of the current execution
8 context)
9 features: [cross-realm]
10 ---*/
11
12 var OProxy = $262.createRealm().global.Proxy;
13 var p = new OProxy(function() {}, {
14 construct: {}
15 });
16
17 assert.throws(TypeError, function() {
18 new p();
19 });