tor-browser

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

arguments-realm.js (690B)


      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 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. Return ? Call(trap, handler, « target, thisArgument, argArray »).
     11 features: [cross-realm]
     12 ---*/
     13 
     14 var f = $262.createRealm().global.eval(
     15  'new Proxy(function() {}, { apply: function(_, __, args) { return args; } })'
     16 );
     17 
     18 assert.sameValue(f().constructor, Array);
     19 
     20 reportCompare(0, 0);