Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Proxy/apply/arguments-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-call-thisargument-argumentslist
5 es6id: 9.5.13
6 description: >
7 Arguments array is created in the Realm of the current execution context
8 info: |
9 [...]
10 7. Let argArray be CreateArrayFromList(argumentsList).
11 8. Return ? Call(trap, handler, « target, thisArgument, argArray »).
12 features: [cross-realm]
13 ---*/
14
15 var f = $262.createRealm().global.eval(
16 'new Proxy(function() {}, { apply: function(_, __, args) { return args; } })'
17 );
18
19 assert.sameValue(f().constructor, Array);