tor-browser

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

evaluation-unmapped-arguments.js (509B)


      1 // |reftest| async
      2 // Copyright 2016 Microsoft, Inc. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 author: Brian Terlson <brian.terlson@microsoft.com>
      7 esid: pending
      8 description: >
      9  Unmapped arguments object is used when the async function doesn't have a
     10  simple parameter list.
     11 flags: [async]
     12 ---*/
     13 
     14 
     15 async function foo(a = 42) {
     16  arguments[0] = 2;
     17  assert.sameValue(a, 1);
     18 
     19  a = 3;
     20  assert.sameValue(arguments[0], 2);
     21 }
     22 
     23 foo(1).then($DONE, $DONE);