tor-browser

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

non-strict-arguments-object-is-immutable.js (755B)


      1 // Copyright 2017 Rick Waldron. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-functiondeclarationinstantiation
      6 description: Non-strict mode function execution context has a mutable "arguments" binding, however it is created with a "false" argument, which means it may not be deleted.
      7 info: |
      8  envRec.CreateMutableBinding("arguments", false).
      9 
     10  CreateMutableBinding(N, D)
     11 
     12  Create a new but uninitialized mutable binding in an Environment Record. The String value N is the text of the bound name. If the Boolean argument D is true the binding may be subsequently deleted.
     13 
     14 flags: [noStrict]
     15 ---*/
     16 
     17 function f1() {
     18  assert.sameValue(delete arguments, false);
     19 }
     20 
     21 f1();
     22 
     23 reportCompare(0, 0);