tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

arguments-realm.js (708B)


      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 description: >
      6  Arguments array is created in the Realm of the current execution context
      7 info: |
      8  [...]
      9  7. Let argArray be CreateArrayFromList(argumentsList).
     10  8. Let newObj be ? Call(trap, handler, « target, argArray, newTarget »).
     11  [...]
     12 features: [cross-realm]
     13 ---*/
     14 
     15 var C = $262.createRealm().global.eval(
     16  'new Proxy(function() {}, { construct: function(_, args) { return args; } })'
     17 );
     18 
     19 assert.sameValue(new C().constructor, Array);
     20 
     21 reportCompare(0, 0);