Debian Codegraph @

js/src/tests/test262/built-ins/Proxy/apply/null-handler-realm.js

raw
1 // Copyright (C) 2019 Aleksey Shvayka. 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-call-thisargument-argumentslist
5 description: >
6 Throws a TypeError exception if handler is null (honoring the realm of the
7 current execution context).
8 info: |
9 [[Call]] (thisArgument, argumentsList)
10
11 1. Let handler be O.[[ProxyHandler]].
12 2. If handler is null, throw a TypeError exception.
13 features: [cross-realm, Proxy]
14 ---*/
15
16 var OProxy = $262.createRealm().global.Proxy;
17 var p = OProxy.revocable(function() {}, {});
18
19 p.revoke();
20
21 assert.throws(TypeError, function() {
22 p.proxy();
23 });
24
25 reportCompare(0, 0);