Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Proxy/construct/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-construct-argumentslist-newtarget
5 es6id: 9.5.14
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. Let newObj be ? Call(trap, handler, « target, argArray, newTarget »).
12 [...]
13 features: [cross-realm]
14 ---*/
15
16 var C = $262.createRealm().global.eval(
17 'new Proxy(function() {}, { construct: function(_, args) { return args; } })'
18 );
19
20 assert.sameValue(new C().constructor, Array);