Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Proxy/isExtensible/call-parameters.js

raw
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 9.5.3
5 description: >
6 The trap is called with handler on its context and the target object as the
7 first parabeter
8 info: |
9 [[IsExtensible]] ( )
10
11 ...
12 8. Let booleanTrapResult be ToBoolean(Call(trap, handler, «target»)).
13 ...
14
15 ---*/
16
17 var _target, _handler;
18 var target = {};
19 var handler = {
20 isExtensible: function(t) {
21 _handler = this;
22 _target = t;
23 return Object.isExtensible(t);
24 }
25 }
26 var p = new Proxy(target, handler);
27
28 Object.isExtensible(p);
29
30 assert.sameValue(_handler, handler);
31 assert.sameValue(_target, target);