Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Proxy/deleteProperty/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-delete-p
5 es6id: 9.5.10
6 description: >
7 Throws when trap is not callable. (honoring the Realm of the current
8 execution context)
9 info: |
10 9.5.10 [[Delete]] (P)
11
12 6. Let trap be GetMethod(handler, "deleteProperty").
13 ...
14
15 7.3.9 GetMethod (O, P)
16
17 5. If IsCallable(func) is false, throw a TypeError exception.
18 features: [cross-realm]
19 ---*/
20
21 var OProxy = $262.createRealm().global.Proxy;
22 var p = new OProxy({}, {
23 deleteProperty: {}
24 });
25
26 assert.throws(TypeError, function() {
27 delete p.attr;
28 });