tor-browser

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

var-env-var-strict-caller-strict.js (573B)


      1 'use strict';
      2 // Copyright (c) 2012 Ecma International.  All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 es5id: 10.4.2-3-c-2-s
      7 description: >
      8    Calling code in strict mode - eval cannot instantiate variable in
      9    the variable environment of the calling context
     10 flags: [onlyStrict]
     11 ---*/
     12 
     13 function testcase() {
     14  var _10_4_2_3_c_2_s = 0;
     15  function _10_4_2_3_c_2_sFunc() {
     16     eval("var _10_4_2_3_c_2_s = 1");
     17     assert.sameValue(_10_4_2_3_c_2_s, 0);
     18  }
     19  _10_4_2_3_c_2_sFunc();
     20 }
     21 testcase();
     22 
     23 reportCompare(0, 0);